PayPal REST API(PHP SDK)成功交易未在沙盒模式下显示,在实时模式下显示

标签 paypal paypal-sandbox paypal-rest-sdk

我正在使用 Paypal PHP REST API SDK,完全遵循 PayPal 提供的示例 here创建和捕获订单。

步骤是:

  1. 创建订单并检索快速结帐 URL ( http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/OrderCreateUsingPayPal.html)。

  2. 输入检索到的 URL,登录到我的 PayPal 沙盒买家帐户,然后批准付款。这会将我重定向到成功 URL。

  3. 执行订单(http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/OrderGet.html)。

  4. 捕获付款 ( http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/OrderCapture.html )。

所有步骤都成功,我没有发现异常,付款和订单状态良好(订单“已完成”,付款“已批准”)。

交易正在进行,我可以看到资金正在测试买家账户和卖家之间转移,地址为 Sandbox Accounts settings。 .

但是,成功 交易不会显示在 https://developer.paypal.com/developer/dashboard/sandbox/ 中的沙盒交易下。 . 失败的交易确实会显示在那里(例如,如果我 try catch 相同的付款两次)。

如果我切换到实时模式,除了成功的交易确实显示在 Live Transactions 下之外,一切都完全一样。 .交易正在进行中,订单在我的账户和买家的账户中显示为“已完成”。

是我做错了什么,还是 PayPal 的沙箱有问题? 为什么沙盒不反射(reflect)实时模式中真正发生的事情?

此外,捕获订单的收据永远不会以任何一种方式发送。唯一发送的电子邮件是:

You submitted an order in the amount of x.xx to MyBusiness

而且它清楚地表明付款尚未收取。所以基本上没有人告诉买家他付了钱。

最佳答案

看来这实际上是预期的行为。

我找到了这些链接(有些很旧):

这似乎表明 PayPal 在捕获付款时故意既不向买家也不向商家发送电子邮件。

有些人说他们收到了一封来自 PayPal 的类似电子邮件:

Tired of email clutter? So are we. To make your life easier, we're eliminating some of the automatic emails we send after transactions. These changes will take effect on February 11, 2009. Though you will no longer receive certain emails, all transaction details will still show up in your PayPal account for your record keeping.

[…]

The emails we're discontinuing are:

  • […]
  • The email you receive when funds move out of your customer's PayPal account (Merchant capture email: ID# PP593)
  • The email your customer receives when funds move out of their PayPal account (Buyer capture email: ID# PP591)
  • […]

To see examples of these emails, visit www.paypal.com/discontinuedemails.

Thanks,
PayPal

您可以在您最喜欢的搜索引擎中搜索 [paypal "merchant capture email"] 或 [paypal "buyer capture email"] 以查找更多此类信息.

我猜你必须发送自己的电子邮件。

Here's a question这可能是相关的,但我不是 100% 确定。

关于PayPal REST API(PHP SDK)成功交易未在沙盒模式下显示,在实时模式下显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32156374/

相关文章:

javascript - Paypal Checkout 客户端集成 - 返回订单 ID promise 的问题

php - 在 WooCommerce 上获取 Paypal 付款详情

rest - Paypal rest api 可以访问个人帐户数据吗?

用于信用卡/借记卡的 Paypal 支付网关

c# - 是否还记得之前 MVC 5 中的重定向操作?

paypal - 以编程方式设置 Paypal IPN url

php - 从 paypal webhooks 获取事件数据

javascript - 删除 PayPal Checkout 中的账单地址字段

Paypal IPN payment_status 表示已完成但付款被拒绝

php - 访问 PayPal 沙箱 Rest API 时响应 401