Papyal Ipn

Discussion in 'Programming' started by tmekinyan, Jul 16, 2008.

  1. #1
    Anybody can help me with the paypal ipn integration?

    I know how it works, but I don't know how to install/integrate it!
     
    tmekinyan, Jul 16, 2008 IP
  2. thenotself

    thenotself Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is a nice PHP library that I have used in many sites, that is available at http:// freshmeat.net/projects/phppaypalipn/.

    This class allows you easy access to many of the ipn functions, and uses curl to make the connections. Personally, I have modified my own copy of this class quite a bit to add some logging.

    Here are the general steps to use the paypal ipn with your site.

    1. Set up a database to record subscription information. Generally I store created date, your customer's id, paypal status, invoice number from paypal, paypal amount. I'd also recommend you store every other field available through the ipn api, so that you always store a complete record of everything.
    2. Create a sandbox account at http:// developer.paypal.com. In your account, create a merchant and a customer sub-account so that you can send an receive sandbox payments.
    3. Use the php paypal_ipn class, and write your own scripts.
    a) Initiate payment request
    b) Paypal IPN script to receive response from Paypal, and indicate that you have received it
    c) Success page to redirect your customer to
    4. Your IPN script should read the transaction type from Paypal. In the IPN class you use $paypal_ipn->get_txn_type() to get the type, and then you have a series of conditions like subscr_signup, subscr_payment, subscr_failed, subscr_cancel, subscr_eot, and subscr_modify. In the case of subscr_payment you read the status (in the IPN class you use $paypal_ipn->get_payment_status()) to see if it's Completed, Cancelled, Declined, Failed, Denied, etc.

    The IPN class comes with sample code, so if you find I didn't give you enough details in my description, you can find what you need in their sample code. You should have a coder for this though, as it's not going to work right out of the box, depending on what type of products you have. It works very well for straight sales, but subscriptions are more difficult.
     
    thenotself, Jul 16, 2008 IP
  3. tmekinyan

    tmekinyan Peon

    Messages:
    86
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for this reply!
     
    tmekinyan, Jul 16, 2008 IP
  4. thenotself

    thenotself Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No problem, write back if you have troubles with that class as I've used it many times!
     
    thenotself, Jul 16, 2008 IP
  5. VishalVasani

    VishalVasani Peon

    Messages:
    560
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hello

    Check it out it's from paypal

    https://www.paypal.com/IntegrationCenter/ic_documentation.html

    It content all thinks required for development.
     
    VishalVasani, Jul 17, 2008 IP
  6. tmekinyan

    tmekinyan Peon

    Messages:
    86
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi, please can you send me an example?
     
    tmekinyan, Jul 21, 2008 IP
  7. thenotself

    thenotself Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thenotself, Jul 21, 2008 IP
  8. tmekinyan

    tmekinyan Peon

    Messages:
    86
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I took a look at this site, but I didn't found where I can download a demo, can you help me?
     
    tmekinyan, Jul 21, 2008 IP
  9. cono1616

    cono1616 Peon

    Messages:
    82
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Do you have to pay for IPN or is it free? I read somewhere it was free but I am sure you have to pay.
     
    cono1616, Oct 18, 2008 IP
  10. tmekinyan

    tmekinyan Peon

    Messages:
    86
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    The IPN is free service
     
    tmekinyan, Oct 18, 2008 IP
  11. VishalVasani

    VishalVasani Peon

    Messages:
    560
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #11
    IPN (Instant Payment Notification) is free service by paypal. It is a API by paypal for checking IPN using code.
     
    VishalVasani, Oct 19, 2008 IP