-1

I am using PayPal Standard HTML form, and after the user has completed the transaction he/she is taken to the return url. I want to be able to identify the user email, the order number, and other information that may be available using php. In other words, I want to use the GET method to retrieve the variables in the URL

This is a recurring payment (subscription), and below is the html code.

  <!-- Identify your business so that you can collect the payments. -->
  <input type="hidden" name="business" value="info@merchant.com">
  <input type="hidden" name="return" value="test">
  <!-- Specify a Subscribe button. -->
  <input type="hidden" name="cmd" value="_xclick-subscriptions">
  <!-- Identify the subscription. -->
  <input id="paymentName" type="hidden" name="item_name" value="test">
  <input type="hidden" name="item_number" value="1234">

  <!-- Set the terms of the regular subscription. -->
  <input type="hidden" name="currency_code" value="CAD">
  <input id="paymentPrice" type="hidden" name="a3" value="0.01">
  <input type="hidden" name="p3" value="1">

  <input type="hidden" name="t3" value="M">

  <!-- Set recurring payments until canceled. -->
  <input type="hidden" name="src" value="1">

  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0" style="width:240px;   border: none; height:50px"
  src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png"
  alt="PayPal - The safer, easier way to pay online"> 
</form>
Pedro Lobito
  • 94,083
  • 31
  • 258
  • 268
code_legend
  • 3,547
  • 15
  • 51
  • 95

1 Answers1

0

As others already commented. You should use Instant Payment Notification (IPN).

documentation

Basically you need to set in your html form a field called "notifyurl", something like this:

<input type="hidden" name="notifyurl"alue="http://www.example.com/ipn_listener.php">

For the ipn_listener.php you have sample code here (if PHP):

Sample code for PHP

If you need to attach some specif information to the payment you can also use the paremeter "custom", and read it back in you ipn listener.

CCamilo
  • 897
  • 1
  • 15
  • 18