When to use IPN and when WebHooks in PayPal as a notification mechanism?

本秂侑毒 提交于 2019-12-13 16:32:14

问题


I'm looking at the documentation of WebHooks and IPN and I wonder: which one should I use my store where I don't need really real-time notifications? Even 1 hour delay will do. How do WebHooks and IPN differ for this matter?


回答1:


This is the entry point for PayPal's notification docs describing Webhooks, IPN and PDT: https://developer.paypal.com/docs/notifications/

I can't offer definitive differences but some sources say that Webhooks are faster on the first message than IPN. Webhooks are indeed more recently implemented. From my experience, IPN messages are complex and not straightforward at all. Webhook messages on first sight looked more straightforward.

Based on your description I don't think there're huge differences. I'd prioritize the approach with more existing libraries (if any) for your stack.




回答2:


Webhooks are HTTP callbacks that receive notification messages for events. Documentation : https://developer.paypal.com/docs/integration/direct/webhooks/

IPN Instant Payment Notification is a message service that automatically notifies merchants of events related to PayPal transactions.

Documentation : https://developer.paypal.com/docs/classic/products/instant-payment-notification/




回答3:


IPN is the classical way of notifying merchants of events such as payments or subscriptions. It's coupled with the deprecated classic API. It might take a minute for events to reach the merchant.

Webhooks is the new REST API way where the event is sent almost instantly to the merchant.

It's better to implement Webhooks because it's the new way and IPN might be disposed of in the future.



来源:https://stackoverflow.com/questions/50272539/when-to-use-ipn-and-when-webhooks-in-paypal-as-a-notification-mechanism

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!