Last active
August 29, 2015 13:57
-
-
Save goooooouwa/9868928 to your computer and use it in GitHub Desktop.
paypal web accept sample. Notice the "notify_url" hidden form input, it's where PayPal sends IPN massage to.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$paypal_url='https://www.sandbox.paypal.com/cgi-bin/webscr'; // Test Paypal API URL | |
$paypal_id='[email protected]'; // Business email ID | |
?> | |
<h4>Welcome, Guest</h4> | |
<div class="product"> | |
<div class="image"> | |
<img src="http://www.phpgang.com/wp-content/uploads/gang.jpg" /> | |
</div> | |
<div class="name"> | |
PHPGang Payment | |
</div> | |
<div class="price"> | |
Price:$10 | |
</div> | |
<div class="btn"> | |
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" name="frmPayPal1"> | |
<input type="hidden" name="business" value="[email protected]"> | |
<input type="hidden" name="cmd" value="_xclick"> | |
<input type="hidden" name="item_name" value="PHPGang Payment"> | |
<input type="hidden" name="item_number" value="1"> | |
<input type="hidden" name="credits" value="510"> | |
<input type="hidden" name="userid" value="1"> | |
<input type="hidden" name="amount" value="10"> | |
<input type="hidden" name="cpp_header_image" value="http://www.phpgang.com/wp-content/uploads/gang.jpg"> | |
<input type="hidden" name="no_shipping" value="1"> | |
<input type="hidden" name="currency_code" value="USD"> | |
<input type="hidden" name="handling" value="0"> | |
<input type="hidden" name="cancel_return" value="http://demo.phpgang.com/payment_with_paypal/cancel.php"> | |
<input type="hidden" name="return" value="http://28c25909.ngrok.com"> | |
<input type="hidden" name="notify_url" value="http://28c25909.ngrok.com"> | |
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> | |
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> | |
</form> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment