【问题标题】:How to test credit card interactions?如何测试信用卡交互?
【发布时间】:2010-09-09 04:11:36
【问题描述】:

看了this answer之后,我想知道是否有办法获得“测试”信用卡号。一种您可以尝试但实际上不收取任何费用的产品。

【问题讨论】:

    标签: testing credit-card


    【解决方案1】:
    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
    

    【讨论】:

      【解决方案2】:

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

      例如,对于 authorize.net,如果您发送“X_TEST_TRANSACTION=true”(或类似的东西,已经很久了),您的 POST 会在测试模式下运行它。

      他们还提供了一个测试 VISA 和测试万事达卡号码,如果处于测试模式,该号码将始终以批准的方式返回,而在生产模式下则拒绝。

      查看您的网关 API 文档,那里会很清楚地详细说明。

      【讨论】:

        【解决方案3】:

        大多数支付处理商要么提供测试编号(PayPal 提供),要么提供进入测试模式的能力(实际上没有交易得到处理)。查阅文档。

        【讨论】:

          【解决方案4】:

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

          【讨论】:

            猜你喜欢
            • 2020-11-18
            • 2015-07-16
            • 1970-01-01
            • 2014-10-25
            • 2013-04-04
            • 2017-09-16
            • 1970-01-01
            • 2014-12-31
            • 2018-11-19
            相关资源
            最近更新 更多