php - PayPal detect insufficient funds -
we have little problem in our system, allow customers pay using paypal great!
but in following situation have issue:
- a customer pays using paypal.
- we send product our customer when transaction has completed.
a few days later, paypal refuses pay because customer have paypal account connected bank account. , funds on bank account low.
so, there way let paypal know when happens through api/url call our server ?
as dagon mentioned, ipn best way handle this.
you'll setup listener script on server, , every time transaction happens on paypal account, paypal server post data account listener script. you'll different parameters depending on type of transaction occurs. can see list of types , parameters here.
you can build email notifications, database updates, etc. ipn script automate post-payment processing tasks.
so, in example you've provided, happen when transaction first takes place ipn triggered payment_status of pending, , you'd see parameter called pending_reason value of echeck. tells payment made, it's echeck takes time clear, status again pending instead of completed.
a few days later when payment clear (or fails) you'd ipn updated payment_status. upon receiving actual completed payment_status deliver order.
again, can automated within ipn script.
Comments
Post a Comment