为什么当我的中继响应 URL 指向 CodeIgniter 控制器时,Authorize.net 会抛出错误,否则不会抛出错误?
我通常不是一名网络开发人员,但我是一名足够体面的编码员,因此我很乐意接受朋友的提议来开发他兄弟的小型企业网站。我即将完成,并且一直在使用 CodeIgniter,它提供了巨大的帮助并且很容易上手。
他们有一些想要通过该网站购买的产品,他们的首选是 Auth.net(我以前没有使用过),并且他们的主机不支持 SSL(nearlyfreespeech.net),所以我决定Auth.net 的 SIM 是合适的。如果我在 CI 应用程序之外使用中继响应页面测试 SIM,该页面仅输出可用的交易详细信息,则一切都会按预期进行。如果我尝试将中继响应页面设置为仅回显字符串的 CI 控制器/方法,Auth.net 将显示以下“错误”:
尝试时发生错误 将此交易报告给 商人。电子邮件已发送至 商家通知他们 错误。以下是结果 尝试收取您的信用费 卡。
此交易已获得批准。
建议您联系 商家确认您会 接收产品或服务。
我最初的想法是,也许我设置的重写规则是为了避免必须包含 index.php 前端控制器,所以我尝试将其包含在中继响应 URL 中而不进行任何更改。我还应该注意到,有问题的控制器实现了 _remap() 方法,但中继响应方法不应受其影响,因为它与正则表达式不匹配。
任何见解将不胜感激。
I'm not typically a web developer, but I'm a decent enough coder that I felt comfortable accepting a proposal from a friend to develop his brother's small business website. I'm nearly finished and I've been using CodeIgniter, which has been a huge help and was easy to jump into.
They have a handful of products they'd like available for purchase via the site, their preference was Auth.net (which I have no previous experience with), and their host does not support SSL (nearlyfreespeech.net), so I decided that Auth.net's SIM was appropriate. If I test SIM outside of the CI application with a relay response page which simply spits out the available transaction details, everything goes as expected. If I try it with the relay response page set to a CI controller/method which simply echoes a string, Auth.net displays the following 'error':
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.
My initial thought was that perhaps the rewrite rule I set up to circumvent having to include the index.php front controller was the issue, so I tried including it in the relay response URL with no change. I should also note that the controller in question implements a _remap() method, but the relay response method shouldn't be affected by it as it doesn't match it's regex.
Any insight(s) would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您的脚本在指定时间内没有响应时,就会出现此错误。如果返回 200 成功消息以外的任何内容,也会显示该信息。所以基本上你的中继响应 URL 中有一个错误。
您需要首先通过直接拉出页面来测试它,看看它是否有效并返回正确的标头响应。然后,您可以通过向其发送模拟 POST 响应来测试它,看看它是否也正确响应。如果这些工作正常,请确保脚本不会花费太长时间来响应。如果是的话,可能有一些方法可以优化慢速页面以提供适当的响应量。
This error occurs when your script doesn't respond within a specified amount of time. It also is displayed if anything other then a 200 success message is returned. So basically there is an error in your relay response URL.
You need to test this first by pulling up the page directly to see if it works and returns the proper header response. Then you can test it by sending a simulated POST response to it and see if it also responds properly. If those work make sure the script isn't taking too long to respond. If it is there probably are ways to optimize the slow page to give the response in the appropriate amount.