Search code examples
node.jspaypalpaypal-ipn

PayPal IPN sending multiple messages


I am working in PayPal sandbox. I have configured IPN to post to my server url, and I am surely running through all the cycle of IPN (it sends me the message, I send 200, then I send message, then I am getting VERIFIED from PayPal). But a day after, I just got another message from PayPal. Why it happens? I know PayPal will continiously send me messages if I dont respond, but I respond to everything. How can that be?

Image of paypal IPN cycle

My code for verification I have taken from this article:

https://medium.com/@danielsternlicht/handling-paypal-ipn-messages-with-nodejs-5ccd97870c4#id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImVkMzZjMjU3YzQ3ZWJhYmI0N2I0NTY4MjhhODU4YWE1ZmNkYTEyZGQiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJuYmYiOjE2NjQ4ODAwNjcsImF1ZCI6IjIxNjI5NjAzNTgzNC1rMWs2cWUwNjBzMnRwMmEyamFtNGxqZGNtczAwc3R0Zy5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInN1YiI6IjExNTc4MTE0OTE4MzIyMTE5MDkwOCIsImVtYWlsIjoiaXZucHJvdHNlbmtvQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhenAiOiIyMTYyOTYwMzU4MzQtazFrNnFlMDYwczJ0cDJhMmphbTRsamRjbXMwMHN0dGcuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJuYW1lIjoiSXZhbiBQcm90c2Vua28iLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EvQUxtNXd1MkNDQkhMdDRpZ3dMYkFZNjRwRjNSSEY0SkhTTkhremNuTzB3LXU9czk2LWMiLCJnaXZlbl9uYW1lIjoiSXZhbiIsImZhbWlseV9uYW1lIjoiUHJvdHNlbmtvIiwiaWF0IjoxNjY0ODgwMzY3LCJleHAiOjE2NjQ4ODM5NjcsImp0aSI6ImM3YTZjYTMwMjRhMjllZWYzM2NmMTEyZTFmMTMzYjEwZjZhNmNiYzAifQ.21Oq1t4VOBqJhH9wtVlm45SG7M5XJBoPSpkF1mca0GX1tU9PbEyHbMC9mAaqCtkN0qk52VxAK2SbQfXpOEdIxdr4gZqX3VZw5Js61JJ6zIBC8ZFOYBO5mRVM14AnhQws-sdyaX37FsV22xhjtpLeVaB9BbYylSNZPOdLAKQ58FFgRIKsAV2B_nmPVEb5ViDfBAnDzMqsy092wZNZ7-8s2FLWMA9d8Qx8PYK6Abvr4hsxvNN6b1dBhD58R_MsQdmnnsAijO_gbDToU7OH8-iao4BHZAtUCNurrXiYqdOrV34pYeRfOSb4pXlL-iIuNj_I50Y7UkNgGRHMX3_e5BMYLw

The first message a day ago:

mc_gross=3.00&protection_eligibility=Ineligible&address_status=confirmed&payer_id=KJB83HATRSBSS&address_street=ESpachstr.+1&payment_date=03%3A44%3A45+Oct+04%2C+2022+PDT&payment_status=Pending&charset=UTF-8&address_zip=79111&first_name=John&mc_fee=0.36&address_country_code=DE&address_name=John+Doe&notify_version=3.9&custom=&payer_status=verified&business=sb-1lklb6504719%40business.example.com&address_country=Germany&address_city=Freiburg&quantity=1&verify_sign=AWfL7B6RVZ8eZWR.PU69WTajzSseAz-s4FHbA0NBw.r1pFqUVTI-KSd-&payer_email=sb-kquao6505370%40personal.example.com&txn_id=9PJ91750BT0424118&payment_type=instant&last_name=Doe&address_state=Baden-W%C3%BCrttemberg&receiver_email=sb-1lklb6504719%40business.example.com&payment_fee=0.36&shipping_discount=0.00&insurance_amount=0.00&receiver_id=WL5ML3MBEBPU2&pending_reason=paymentreview&txn_type=express_checkout&item_name=&discount=0.00&mc_currency=USD&item_number=&residence_country=DE&test_ipn=1&shipping_method=Default&transaction_subject=&payment_gross=3.00&ipn_track_id=f516a429d3b1e

The second message:

mc_gross=3.00&protection_eligibility=Eligible&address_status=confirmed&payer_id=KJB83HATRSBSS&tax=0.00&address_street=ESpachstr.+1&payment_date=03%3A44%3A45+Oct+04%2C+2022+PDT&payment_status=Completed&charset=UTF-8&address_zip=79111&first_name=John&mc_fee=0.36&address_country_code=DE&address_name=John+Doe&notify_version=3.9&custom=&payer_status=verified&business=sb-1lklb6504719%40business.example.com&address_country=Germany&address_city=Freiburg&quantity=1&verify_sign=AVTL5g-BCb02dVzBaOm2ffAGKcHyAyGn2INeuTCCGdoH5MC547XMRptK&payer_email=sb-kquao6505370%40personal.example.com&txn_id=9PJ91750BT0424118&payment_type=instant&last_name=Doe&address_state=Baden-W%C3%BCrttemberg&receiver_email=sb-1lklb6504719%40business.example.com&payment_fee=0.36&shipping_discount=0.00&insurance_amount=0.00&receiver_id=WL5ML3MBEBPU2&txn_type=express_checkout&item_name=&discount=0.00&mc_currency=USD&item_number=&residence_country=DE&test_ipn=1&shipping_method=Default&handling_amount=0.00&transaction_subject=&payment_gross=3.00&shipping=0.00&ipn_track_id=66f75f44856ce


Solution

  • message 1:

    payment_status=Pending&pending_reason=paymentreview

    message 2:

    payment_status=Completed

    These are separate events for different stages of the payment, hence separate IPN messages.