Shawn
Shawn

Reputation: 71

Recive user mail through paypal

I need to make a api that after the user purchases and e-book through paypal, the webpage creates an user account and random password.

I was wondering if this is correct https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/paymentdatatransfer/

Or is there a better approach.

Thank you

Upvotes: 0

Views: 40

Answers (1)

Eshan
Eshan

Reputation: 3677

Instead of using the PDT you can make use of the PayPal IPN . IPN works independently of the return page .Once the payment is completed PayPal sends the IPN to your IPN server . In case of the PDT think of the scenario where the user closes the PayPal's "thank you" page after the Payment completion and he will never come back to your return url ,so you will not be able to generate the username and password for him .

But in case of IPN , you will receive the IPN ,once they complete the payment and you need not worry about them to come to your return url ( if in case someone misses ).

You can find the IPN related documentation here: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/

Upvotes: 1

Related Questions