Variables upon submitting Paypal form

2019-03-01 06:01发布

问题:

<form>
    <!--- paypal form --->
</form>

How to send data thru paypal when submitting?

For example:

  1. Upon submitting the form with an #ID value of "12345" and after paying successfully.

  2. It will return back to my site ThankYou.php

Question: how will I get the value 12345? or can I use

//ThankYou.php
<?php
echo $_REQUEST["#ID"];
?>

Thanks in advance!!

回答1:

PayPal allows you to post custom values. You should be able to put a hidden form field value on your form that will make the trip back on return. Their documentation has all that information.

This may work:

<input type="hidden" name="custom" value="Id value" />