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:

The Future of Technology: Emerging Trends to Watch in 2025

Introduction As we navigate through 2025, the technological landscape continues to evolve at an unprecedented pace. Innovations that once se...