Paypal + PHP

Discussion in 'PayPal' started by webmasterplace, Sep 10, 2009.

  1. #1
    Hi,

    Is it possible to integrate Paypal into a PHP script?
    I'd like to create a script when the user has paid correctly, there should automaticly run a PHP script to e.g. execute MySQL queries.

    E.g.

    User goes to my site -> click the Paypal pay button -> user goes to Paypal to pay -> Payment complete, user returns to my site -> MySQL queries executed.

    I think it is possible, but can't really find something on the Paypal website.

    Thanks!
     
    webmasterplace, Sep 10, 2009 IP
  2. isell86400seconds

    isell86400seconds Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What you're looking for is the Instant Payment Notification (https://www.paypal.com/ipn)
    After any transition, paypal runs your script passing you all the details of the payment.
     
    isell86400seconds, Sep 10, 2009 IP
  3. Wajahat

    Wajahat Well-Known Member

    Messages:
    220
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #3
    i dont think it is possible...
    and paypal has very good arrangement of contents...
     
    Wajahat, Sep 10, 2009 IP
  4. webmasterplace

    webmasterplace Peon

    Messages:
    802
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It seems like the Paypal IPN does what I need :)
    Thanks for the tip!
     
    webmasterplace, Sep 11, 2009 IP
  5. binarybd

    binarybd Member

    Messages:
    210
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #5
    Yea. this is good suggession
     
    binarybd, Sep 17, 2009 IP
  6. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #6
    There are a number of available Paypal API's that allow this. IPN is the most simple method. Personally, I like the express checkout method much better, as your visitor starts and ends on your website. With IPN your visitor ends on Paypal's site, and then can opt not to return to your website. IPN provides a call-back, but it is far easier and more reliable when your visitor triggers the event and not an API callback. It's also a significant improvement in usability, which reduces purchase abandonment.
     
    jestep, Sep 17, 2009 IP
  7. jNorth

    jNorth Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    it is quite possible and I depend on it. They even provide PHP examples. Check out their developer forums.

    You might need to be paypal pro level (or whatever they call it).
     
    jNorth, Sep 22, 2009 IP
  8. jNorth

    jNorth Peon

    Messages:
    202
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    also, IPN is is independant of the payment method. you can have an ipn call for express pay, cc pay, or even virtual term pay. IPN gives and independent verification of payment and lets you trigger such things as inventory adjust, etc...
     
    jNorth, Sep 22, 2009 IP