Sagepay API - 模拟被拒绝的付款?
我正在测试一个通过 Sagepay 接受付款的应用程序。 一切似乎都正常,但我想在 Sagepay 沙箱中测试各种类型的不成功响应。
例如,到目前为止我所做的每个测试都返回了“正常”状态。还可以接收诸如 REJECTED、NOTAUTHED、INVALID 等状态
是否可以以某种方式模拟这些响应?
重复输入不正确的详细信息只会返回到我在 API 设置中指定的失败 URL。
I'm testing an app which accepts payments through Sagepay.
It all seems to be working OK but I would like to test various types of non-successful responses in the Sagepay sandbox.
For example, each test I have done so far has returned a status of OK. It is also possible to receive statuses like REJECTED, NOTAUTHED, INVALID etc
Is it possible to simulate these responses in some way?
Entering incorrect details repeatedly just returns me to the failure URL I specify in the API settings.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您通过 https://test.sagepay.com/simulator/ 登录 Sagepay 上的模拟器帐户您可以告诉它返回哪些响应。您可以指示它返回随机响应,或格式错误、无效、错误、未授权、拒绝、3DAUTH。
不幸的是,您必须通过管理面板更改这些,然后它们适用于每笔交易,而不是使用不同的详细信息来触发不同的响应。
If you login to your simulator account on Sagepay via https://test.sagepay.com/simulator/ you can tell it which responses to return. You can instruct it to return random responses, or MALFORMED, INVALID, ERROR, NOTAUTHED, REJECTED, 3DAUTH.
Unfortunately you have to change these through the admin panel and then they apply for each transaction rather than using different details to trigger different responses.
除了 Steve 的回答之外,如果您使用服务器集成,您可以单击不同的按钮来模拟(在模拟器服务器上)来自 SagePay 网关的回复。
In addition to Steve's answer, if you use the SERVER integration you can click different buttons to SIMUALATE (on the SIMULATOR server) a reply from SagePay gateway.