简体   繁体   English

未收到paypal webhook通知 - 沙盒模式

[英]paypal webhook notification not received - sandbox mode

I'm trying to get notified via webhooks when a simple payment is made, however I don't receive any request from paypal on the specified URL. 我正在尝试通过webhooks收到简单付款时的通知,但是我没有从指定的URL收到来自paypal的任何请求。 Here is what I've done: 这就是我所做的:

  1. I have 2 sandbox accounts: Facilitator and Buyer 我有2个沙箱帐户:协调人和买方
  2. Create an app (sanbox mode) for the facilitator account 为辅导员帐户创建应用程序(sanbox模式)
  3. Add a webhook URL in that app 在该应用中添加webhook网址
  4. Login into sanbox.paypal.com with the sandbox facilitator username and password 使用沙箱服务商用户名和密码登录sanbox.paypal.com
  5. Generate a buy now button with a test product 使用测试产品生成立即购买按钮
  6. Paste the button code on my page and make a purchase with the sanbox Buyer account 将按钮代码粘贴到我的页面上,然后使用sanbox Buyer帐户进行购买

In developer dashboard the payment is received if I go to Sandbox -> Notifications: "Notification of Payment Received from test buyer", but the webhook page on my server is not called. 在开发人员仪表板中,如果我转到Sandbox - >通知:“从测试买方收到的付款通知”,则会收到付款,但我的服务器上的webhook页面未被调用。 I know this because the php script creates a txt file every time the page is called. 我知道这是因为php脚本每次调用页面时都会创建一个txt文件。 Also if I go to Developer Account -> Webhook Notifications and select the app I have this message: You don't have any events for the selected application 此外,如果我转到开发者帐户 - > Webhook通知并选择应用程序我有此消息: 您没有任何所选应用程序的事件

NOTE: If I add the URL in the webhook simulator everything works great. 注意:如果我在webhook模拟器中添加URL,一切都很好。

Am I doing something wrong? 难道我做错了什么? Do I have to connect the app with the buy now button? 我是否必须使用立即购买按钮连接应用程序?

Thanks 谢谢

Webhooks is only used for REST payments. Webhooks仅用于REST支付。 However for Paypal buttons created in PP account, you need to use Paypal IPN. 但是对于在PP帐户中创建的Paypal按钮,您需要使用Paypal IPN。 Here is the guide for IPN and IPN script for your reference. 以下是IPN和IPN 脚本指南供您参考。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM