May 28, 2015

PHP PayPal sandbox form for testing.



The following form just display 'Buy Now' button for PayPal sandbox and its redirect to PayPal site when you can click on that button.

- You can easily change item_name, amount, return URL, business email.

<form name="_xclick" action="https://www.sandbox.paypal.com/webscr" method="post" id="payfrm">
 <input type="hidden" name="cmd" value="_xclick">
 <input type="hidden" name="business" value="phpdeveloper@gmail.com">
 <input type="hidden" name="currency_code" value="USD">
 <input type="hidden" name="item_name" value="PHP Learning Book">
 <input type="hidden" name="return" value="http://domainname.com/success.php">
 <input type="hidden" name="amount" value="20">
 <input type="image" src="./form_files/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it&#39;s fast, free and secure!">
</form>

- If you want PayPal live site then just change action URL: https://www.paypal.com/webscr

Enjoy!

2 comments:

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...