如何测试信用卡交互?

发布于 2024-07-04 13:50:29 字数 171 浏览 3 评论 0原文

阅读这个答案后,我想知道是否有办法获得“测试”信用卡号。 您可以尝试一下,但实际上不收取任何费用。

After reading this answer, I wonder if there's a way to get a "testing" credit card number. One that you can experiment with but that doesn't actually charge anything.

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

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

发布评论

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

评论(4

薄荷→糖丶微凉 2024-07-11 13:50:32

大多数支付处理商要么提供测试号码(PayPal 就是这样做的),要么提供进入测试模式的能力(在这种模式下,实际上不会处理任何交易)。 请参阅文档。

Most payment processors provide either a testing number (PayPal does this) or the ability to go into testing mode (in which no transactions actually get processed). Consult the documentation.

多情癖 2024-07-11 13:50:31

根据您的支付网关,有两种测试交易的方法。

例如,对于authorize.net,如果您通过 POST 发送“X_TEST_TRANSACTION=true”(或类似的内容,已经很长时间了),它将在测试模式下运行。

他们还提供测试 VISA 和测试万事达卡号码,如果在测试模式下,这些号码将始终返回为批准状态,而在生产模式下则被拒绝。

看一下你的网关API文档,那里写得很清楚。

Depending on your payment gateway, there are two ways to test a transaction.

For example, with authorize.net, if you send "X_TEST_TRANSACTION=true" (or something like that, its been a long time), with your POST, it will run it in test mode.

They also provide a test VISA and test Mastercard number that will always come back as approved if in test mode, and declined in production mode.

Look at your gateway API documentation, it will be clearly detailed there.

花落人断肠 2024-07-11 13:50:30
MasterCard: 5431111111111111
Amex: 341111111111111
Discover: 6011601160116611
American Express (15 digits)  378282246310005
American Express (15 digits)  371449635398431
American Express Corporate (15 digits)  378734493671000
Diners Club (14 digits)  30569309025904
Diners Club (14 digits) 38520000023237
Discover (16 digits)  6011111111111117
Discover (16 digits)  6011000990139424
JCB (16 digits) 3530111333300000
JCB (16 digits)  3566002020360505
MasterCard (16 digits)  5555555555554444
MasterCard (16 digits)  5105105105105100
Visa (16 digits)  4111111111111111
Visa (16 digits)  4012888888881881
Visa (13 digits)  4222222222222

信用卡前缀号码:

Visa: 13 or 16 numbers starting with 4
MasterCard: 16 numbers starting with 5
Discover: 16 numbers starting with 6011
AMEX: 15 numbers starting with 34 or 37
MasterCard: 5431111111111111
Amex: 341111111111111
Discover: 6011601160116611
American Express (15 digits)  378282246310005
American Express (15 digits)  371449635398431
American Express Corporate (15 digits)  378734493671000
Diners Club (14 digits)  30569309025904
Diners Club (14 digits) 38520000023237
Discover (16 digits)  6011111111111117
Discover (16 digits)  6011000990139424
JCB (16 digits) 3530111333300000
JCB (16 digits)  3566002020360505
MasterCard (16 digits)  5555555555554444
MasterCard (16 digits)  5105105105105100
Visa (16 digits)  4111111111111111
Visa (16 digits)  4012888888881881
Visa (13 digits)  4222222222222

Credit Card Prefix Numbers:

Visa: 13 or 16 numbers starting with 4
MasterCard: 16 numbers starting with 5
Discover: 16 numbers starting with 6011
AMEX: 15 numbers starting with 34 or 37
乱了心跳 2024-07-11 13:50:30

大多数支付网关提供此类数字来测试其服务,但它们通常仅适用于这些网关的临时/测试版本。

Most payment gateways provide such numbers for testing their services, but they will generally only work on the staging/test versions of those gateways.

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