Skip to content

Instantly share code, notes, and snippets.

@asadaly111
Created November 7, 2017 13:31
Show Gist options
  • Save asadaly111/9fa770b93e371ea6539e075d75eac0e4 to your computer and use it in GitHub Desktop.
Save asadaly111/9fa770b93e371ea6539e075d75eac0e4 to your computer and use it in GitHub Desktop.
Paypal form
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="test@test.com">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo $_POST['item']['dsc']; ?>">
<input type="hidden" name="item_number" value="<?php echo $_POST['item']['id']; ?>">
<input type="hidden" name="amount" value="<?php echo $_POST['item']['amount']; ?>">
<input type="hidden" name="currency_code" value="USD">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online" value="PDT">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
<!--
<input type="hidden" name="cmd" value="_notify-synch">
<input type="hidden" name="tx" value="TransactionID">
<input type="hidden" name="at" value="YourIdentityToken">
<input type="submit" value="PDT">
-->
<!-- Specify URLs -->
<input type='hidden' name='cancel_return' value='http://localhost/testwp/custom-form/'>
<input type='hidden' name='return' value='http://localhost/testwp/success/'>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment