模拟 Amazon FPS 沙盒上的错误

发布于 2024-12-07 02:58:43 字数 169 浏览 0 评论 0原文

我已经设置了我的亚马逊灵活支付沙箱帐户,并一直在使用 PHP 库来模拟接受付款等。

我只是想知道是否有人知道一种方法来模拟我预计会遇到的实际错误情况,例如当有人运行一张被拒绝的卡时会发生什么。

API 指南确实告诉您将返回哪些状态代码,并且告诉我我必须信任它们,但我总是喜欢尽可能多地进行测试。

I've set up my Amazon flexible payments sandbox account and have been using the PHP library to simulate accepting payments and what not.

I was just wondering if anyone knew of a way to simulate realistic error conditions I would expect to encounter, such as what happens when someone runs a card that gets declined.

The API guide does tell you what status codes will be returned, and something tells me I just have to trust them, but I always like to test as much as possible if possible.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野味少女 2024-12-14 02:58:43

答案的链接位于此处的评论中,但获得带有摘要的实际答案也没什么坏处。 高级快速入门指南中提供了有关在测试沙箱中模拟错误条件的详细信息。

通过设置 SenderTokenId 的值可以模拟以下错误:

已关闭帐户:Z1LGRXR4HMDZBSFKXELA32KZASGWD8IHMHZCK4DETR784LDLD1GMFW4P3WT8VTGX

电子邮件地址未验证:E3FR7BARJV3PB631PMKV74PGKCJLBHI1Q1KMQN7BJ2JJICPDKN3N1CJIKFZ8D7NN

已暂停帐户:H216UECZ8ZM1G8G4QA3V7RKF8JDFZ9SI3SJAFSGUKBBNDHX1NVM8GUQRZNRNAHER

可以通过设置 RecipientTokenId 的值来模拟以下错误:

已关闭帐户:P1LL7A1LHK935DBGI5NAYCXOCLVEBHBNIU7PBXBAMRKKNLDEPI8M3MUSLZT2VANZ

电子邮件地址未验证:C4LGSEMXN11FTUXZ2X2C7QVFHN5DVBGQJNF17AIQXXXQSX4DRG4KJFCN2KRFUUZI

已暂停帐户:R3VK49XVGCAZTJSXKN7ZSBHPMFGKM5VEEQTXGMVE8CFUZ2G5RLLMAB4J6TQRL6BU

最后,设置金额值,使其包含以下值之间的十进制值,将模拟以下错误:

暂时下降:0.60 至 0.69

付款错误:0.70 至 0.89

不幸的是,最后的详细信息可能已过时。 页面似乎暗示小数点后有 7 或 8 将产生非常通用的“失败”。通过测试,我可以确认 0.6 确实会导致暂时失败(状态会停留在“待处理”一段时间,然后最终前进到“成功”),而 0.7 和 0.8 会导致相同的“TransactionDenied”错误。

A link to the answer is in the comments here, but it wouldn't hurt to have an actual answer with a summary. There's details about simulating error conditions in the testing sandbox in the advanced quick start guide.

The following errors can be simulated by setting the value for SenderTokenId:

Closed account: Z1LGRXR4HMDZBSFKXELA32KZASGWD8IHMHZCK4DETR784LDLD1GMFW4P3WT8VTGX

Email address not verified: E3FR7BARJV3PB631PMKV74PGKCJLBHI1Q1KMQN7BJ2JJICPDKN3N1CJIKFZ8D7NN

Suspended account: H216UECZ8ZM1G8G4QA3V7RKF8JDFZ9SI3SJAFSGUKBBNDHX1NVM8GUQRZNRNAHER

The following errors can be simulated by setting the value for RecipientTokenId:

Closed account: P1LL7A1LHK935DBGI5NAYCXOCLVEBHBNIU7PBXBAMRKKNLDEPI8M3MUSLZT2VANZ

Email address not verified: C4LGSEMXN11FTUXZ2X2C7QVFHN5DVBGQJNF17AIQXXXQSX4DRG4KJFCN2KRFUUZI

Suspended account: R3VK49XVGCAZTJSXKN7ZSBHPMFGKM5VEEQTXGMVE8CFUZ2G5RLLMAB4J6TQRL6BU

And finally, setting the amount value such that it includes a decimal value between the following values will simulate the following errors:

Temporary Decline: .60 to .69

Payment Error: .70 to .89

Unfortunately, that last detail may be out of date. This page seems to imply that having 7 or 8 after the decimal point will create the terribly generic "Failure". From testing, I can confirm that 0.6 does lead to a temporary failure (status is stuck in "Pending" for a while before eventually advancing to "Success"), and 0.7 and 0.8 result in the same "TransactionDenied" error.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文