简体   繁体   中英

paypal ipn integration in php

I am building a website that generates invoices, and also creates a 'pay now' button. I was looking at paypal IPN as it appears to be the easiest to integrate into the site.

I had a question regarding it that I couldn't seem to find in the Developer documentation.

Is the PayPal IPN only one way? What I mean, is can I generate a URL that directs a user to Paypal, and along with that URL the customer name, invoice # and payment amount, that paypal can then use to process a payment, and send a paypal IPN back with some (or all) of the values I sent it to begin with?

For example, if the link for the button was https://paypal.com/paynow/pay?invoice_number=123458&pay_total=109.99

If the user clicked the button on the page (or in the email), they would be sent to paypal where they could fill in their payment details, process the payment, and paypal would send a response back to my listening URL, also giving me back at least the invoice_number parameter that I passed it?

This would be really helpful, and I appreciate all the feedback.

For invoice number you would just use the specific parameter available for that, which is called invoice . This would then come back in IPN as $_POST['invoice'] .

The total would be part of IPN data by default. Anything truly custom that you need can be done with the custom parameter, which stores up to 256 characters and would then come back in $_POST['custom'] within your IPN script.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM