使用 PHP 处理 Authorize.net 中继响应

Processing Authorize.net relay response with PHP

说到 online CC processing integration,我算是个新手。我在 Authorize.NETSandbox 试图 configure 我的 serverprocess SIM orders payment 页面 form resides Authorize.net serversprocesses 的顺序。默认情况下,confirmation 看起来像是在他们的 sites 上,并且 e-mails 可以配置为发送给买家和卖家。这就是 Sandbox 中的所有工作。但是,我正在尝试使用中继响应在我的服务器上捕获一些订单和处理信息。我的处理页面可以在我的服务器上访问,尽管我必须说我间歇性地受到 .htaccess 限制,因为它仍在 development 中。我在测试时将其关闭。

我得到的错误是:

An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

  This transaction has been approved.

It is advisable for you to contact the merchant to verify that you will receive the product or service.

我无法判断它们是否 POSTING data 到我的页面,而且我不太清楚响应页面上的内容以及如何解析响应。我正在使用 Authorize.NET 提供的 PHP SDK。其余的似乎工作。我得到了买家和卖家的 e-mails 并且订单已处理,但我没有在我们的服务器上捕获信息。我想做的是绕过他们的 confirmation page,接收中继响应,创建自定义确认并为我们的 database 捕获一些 data。我会继续挖掘,因为我只是阅读文档就取得了相当大的进步。这个特别有用。

谢谢。

我想通了。页面上出现错误,显示“500”错误。我不得不说,他们设置它的方式有点奇怪。它们 POSTING 到我的页面,我在那里捕获 POST 数据,将内容写入数据库,然后创建自定义确认消息,尽管它必须通过 header 重定向因为它显示在他们的服务器上(他们的域在地址栏中)。一切正常,但显然,在那种情况下,我的脚本无法使用任何 SESSION 变量值?