Msg#: 4208511 posted 3:15 am on Sep 29, 2010 (gmt 0)
I have a website now where people who want to pay with paypal, click on PayPal, and the form sends over what they are ordering. They enter in their info and then they pay on PayPal. Once they pay, they don't go back to my site.
I had a few questions:
1) How can I get PayPal to redirect them back to my site, so I can show them a "Thank you" page.
2) I have API access, does anyone know of a good "plug and play" PHP code example of PayPal API access (going through their documentation hurts my noob eyes).
I want to run affiliates through my store, so I need a way to get these guys to return to my site after payment so I can call conversion code, and also give out order numbers.
Msg#: 4208511 posted 3:34 am on Sep 29, 2010 (gmt 0)
The following parameters in your form should be of use, then: - return (guess what it is!) - cancel_return - rm which dictates how they return (values 0, 1 or 2 IIRC) - either "custom" or "invoice" for the identifier to be returned. You can configure Paypal not to accept duplicate payments for the same "invoice" number
There's a PDF somewhere which details all the variables and is a bit less ugly than the HTML documentation.
Note that even if you do everything to have them return to your site, in many cases they won't: - either because they did not have a Paypal account and it was suggested to them after payment that they should open one - or because they didn't like the warning if you send them back to a non-secure page (depends on the value of rm) - or simply because they don't feel like it for some reason
You should thus be prepared to store the payments in your DB, and display the tracking code on a future visit (and then flag the payment as "tracked"), or talk to your affiliate network(s) about batch processing or whatever solution they might have for you.
Of course, you should use IPN to receive notifications of the payments.
Msg#: 4208511 posted 8:20 pm on Oct 1, 2010 (gmt 0)
Almost every open source shopping cart has a Paypal module. Those would be good starting points. The problem is that they are connecting the PP API with the cart API, which can make it hard to sort out if you don't know the cart API.
Also, try searching on "Paypal PHP class" - lots of options