I’ve been at this for a bit now, and I have tried using google extensively.
I have my application set up: it is a HWID System available only to paid subscribers.
I want buyers to be able to click on a ‘buy now button’, and once they successfully pay it automatically adds their information into the database the app uses. This way there is no waiting after payments.
I know this is possible, because I’ve seen it done before – I just can’t seem to find how it works?
I would prefer this be done in php as well.
Basically you will need to use the Paypal API’s –
You specified that you don’t want any waiting to update records after payments. Depending on your plans you should be aware of the dangers of assuming payment has been processed (before it has).
There are a number of ways someone could either trick your system into thinking they have paid using paypal (when actually their payment failed or they are trying to commit fraud).
So if you just updated your records based on their return value after paying with paypal it could lead you open to problems. So I personally wouldn’t do the operations you specified unless I know the payment has gone through OK, and how do you do that?
I would use paypal’s IPN (you could even combine this with PDT to get an early indicator / info for your user), so the steps:
On my testing you generally receive the IPN within a few seconds after payment (sometimes even before the user has been redirected. But for times where IPN takes longer to process you would need to keep your user updated with payment progress (you could use the PDT data for this) or just display a message on the redirect page from paypal.
There is a lot to go through from paypal’s end, but if you take it step by step, it isn’t that painful.