thenbrent / paypal-digital-goods

The missing PayPal Digital Goods PHP library. Discontinued - PayPal no longer offer the Digital Goods product.
Other
121 stars 36 forks source link

Static website integration #14

Closed samtuke closed 10 years ago

samtuke commented 10 years ago

Would payments (specifically recurring payments) work if the PayPal button was hosted on a static page, the callback URL was the only scripted page, and that page instantiated a new PayPal_Subscription{} object and called start_subscription() upon it?

e.g. /donate.html -> PayPal.com -> /process.php -> thank-you.html

Think of the paypal button on a site generated by Jekyll or Pelican.

Thanks!

thenbrent commented 10 years ago

It would be possible if you have another script to handle checkout, like this example which uses this script.

The reason being that to initiate the checkout, you need to have a checkout token. This doc might help: https://developer.paypal.com/docs/classic/express-checkout/digital-goods/IntroducingExpressCheckoutDG/

samtuke commented 10 years ago

Very helpful, thanks @thenbrent