[英]PayPal Webhook Notification Billing Subscription PHP
我已經使用PayPal-PHP-SDK實現了PayPal Billing訂閱,一切都按預期運行,用戶可以使用此代碼從應用程序中取消訂閱。
$agreementStateDescriptor = new AgreementStateDescriptor();
$agreementStateDescriptor->setNote("Suspending the Agreement.");
$agreement->suspend($agreementStateDescriptor, $apiContext);
但是,如果用戶從其PayPal帳戶中取消訂閱,我的應用程序將不會收到通知,如何處理? 是否有任何Webhook作為Stripe之類的東西。
https://github.com/paypal/PayPal-PHP-SDK/
謝謝
您需要為您的應用程序創建Paypal Webhook。
設置一個URL(可訪問URL),即yourdomain/paypal/resolver
然后注冊事件BILLING.SUBSCRIPTION.CANCELLED
。
一旦用戶從貝寶(Paypal)取消協議, BILLING.SUBSCRIPTION.CANCELLED
事件的BILLING.SUBSCRIPTION.CANCELLED
被激活,並向您的站點發送請求。
僅供參考,此鏈接http://paypal.github.io/PayPal-PHP-SDK/sample/提供的示例非常有用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.