Author Topic: Need help with paypal  (Read 549 times)

Offline megamoola

  • Level 1
  • *
  • Posts: 1
  • Reputation: +0/-0
    • View Profile
Need help with paypal
« on: January 19, 2009, 10:57:12 AM »
Hello,

I am trying to get users to purchase membership packages through paypal. My problem is that I don't know how to make it automatic, so that they receive the package the instant they pay for it, not the next day when I check for incomming transactions. Can anybody help me with this problem?

Offline codestryke

  • Administrator
  • Level 33
  • *****
  • Posts: 589
  • Reputation: +22/-0
    • View Profile
    • eXtremeCast Games
Creating online addictions, one game at a time:

Offline Barrikor

  • Level 21
  • *
  • Posts: 248
  • Reputation: +3/-0
    • View Profile
Re: Need help with paypal
« Reply #2 on: January 19, 2009, 03:45:24 PM »
If you are using PayPal's Website Payments Pro ($30 a month) instead of PayPal's Website Payments Standard, then you can use their PHP NVP SDK and testing sandbox to get yourself set up. If you are just going to use a modified version of the SDK then you could write your "membership package" script on a new file and include() it inside DoDirectPaymentReceipt.php and DoExpressCheckoutPayment.php after the successful transaction happens.


You can download the sdk here: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_download_sdks


BTW: Make sure to add "exit;" to DoDirectPaymentReceipt.php after line 73; if you don't, the "successful transaction" code on the server will run even if the transaction fails, but it still redirects to APIError.php showing the failed transaction *after that*... most devs don't realize there's a problem at first... (I told PayPal but they still hadn't fixed it last time I looked)

« Last Edit: January 19, 2009, 04:21:30 PM by Barrikor »
Projects: Pith Framework (at 0.5), CactusGUI (at 0.3)

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal