为什么Authorize.net抛出一个错误,当我的中继响应URL指向一个CodeIgniter控制器,而不是其他? [英] Why is Authorize.net throwing an error when my relay response URL points to a CodeIgniter controller and not otherwise?

查看:212
本文介绍了为什么Authorize.net抛出一个错误,当我的中继响应URL指向一个CodeIgniter控制器,而不是其他?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常不是一个网络开发人员,但我是一个足够好的编码器,我很愿意接受一个朋友的建议,以开发他的兄弟的小商业网站。我几乎完成了,我一直在使用CodeIgniter,这是一个巨大的帮助,很容易跳入。



他们有一些产品,他们喜欢通过网站购买,他们的偏好是Auth.net(我没有以前的经验),他们的主机不支持SSL(almostfreespeech.net),所以我决定Auth.net的SIM是合适的。如果我在CI应用程序外测试SIM卡,中继响应页面只是突破了可用的交易细节,一切都如预期。如果我尝试它的继电器响应页设置为一个CI控制器/方法,只是回显一个字符串,Auth.net显示以下'错误':


尝试
时发生错误,将此交易报告给
商家。电子邮件已发送到
商家通知他们
错误。以下是
试图向您的信用卡
卡收取的结果。



此交易已批准。



建议您联系
商家以确认您将
收到产品或服务。


我最初的想法是,或许重写规则,我设置规避,包括index.php前控制器是问题,所以我试图包括它在中继响应URL没有改变。我还应该注意到,控制器实现一个_remap()方法,但中继响应方法不应受其影响,因为它不匹配它的regex。


解决方案

此错误发生在您的脚本在指定的多少时间。如果返回任何其他的200成功消息,也显示它。因此,基本上您的中继响应网址中存在错误。



您需要先测试此页面,直接拉起页面以查看其是否正常,并返回正确的标题响应。然后,您可以通过发送一个模拟的POST响应来测试它,并查看它是否也正确响应。如果这些工作确保脚本没有花太长时间来响应。如果它是可能有办法优化慢页面给予适当的响应。


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.

解决方案

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.

这篇关于为什么Authorize.net抛出一个错误,当我的中继响应URL指向一个CodeIgniter控制器,而不是其他?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆