无法使用 Authorize.Net ARB 获取交易 ID

Unable to get the transaction id using Authorize.Net ARB

我正在努力在 Laravel 框架中实施 Authorize.Net 的自动定期计费 API。

场景是我有一个网站,用户注册我们的服务,我们按月向他们收费,为此我们实施了自动定期计费。

但是我无法获取成功下单交易的交易ID。

ARB 在处理付款时不会 return 交易 ID。它只建立定期订阅。如果您想要每次成功订阅付款的交易 ID,您将需要使用可用的两个选项之一。

  1. Webhooks

您可以set up a webhook using the Webhooks API to be notified whenever a successful payment is made for a subscription. Although very little information is sent over with a webhook as it is best paired with the Transaction Details API,交易 ID 是随 webhook 通知一起发送的信息之一。

  1. 沉默Post

Silent Post is very similar to Paypal's IPN. Whenever a transaction is made Authorize.Net will send transaction details to a URL you specify which includes the transaction ID. Handling a Silent Post notification is easy 因为它看起来完全像一个表单提交。

Silent Post 已被弃用并将消失,因此不建议您再使用它。

披露:我写了关于 Webhooks 和 Silent 的文章Post。