kotlin - 我们无法完成此操作。尝试其他付款方式或联系我们。 [OR_CCREU_02]

标签 kotlin payment-gateway google-pay

我从 Google Pay 文档实现了 Google Pay,当我在测试环境中测试它时,我收到错误

"we couldn't complete this action. Try a different payment method or contact us. [OR_CCREU_02]"

我花了近 4 天的时间来解决这个错误,但对我没有任何帮助。 任何人都知道如何解决此错误并测试测试环境的 Google Pay 交易

image 1 这是我的 json:

{
    "apiVersion": 2,
    "apiVersionMinor": 0,
    "allowedPaymentMethods": [
        {
            "type": "CARD",
            "parameters": {
                "allowedAuthMethods": [
                    "PAN_ONLY",
                    "CRYPTOGRAM_3DS"
                ],
                "allowedCardNetworks": [
                    "AMEX",
                    "DISCOVER",
                    "JCB",
                    "MASTERCARD",
                    "VISA"
                ],
                "billingAddressRequired": true,
                "billingAddressParameters": {
                    "format": "FULL"
                }
            },
            "tokenizationSpecification": {
                "type": "PAYMENT_GATEWAY",
                "parameters": {
                    "gateway": "example",
                    "gatewayMerchantId": "DCR2DFGGHP7EJS"
                }
            }
        }
    ],
    "transactionInfo": {
        "totalPrice": "1000",
        "totalPriceStatus": "FINAL",
        "countryCode": "US",
        "currencyCode": "USD"
    },
    "merchantInfo": {
        "merchantName": "example"
    },
    "shippingAddressParameters": {
        "phoneNumberRequired": false,
        "allowedCountryCodes": [
            "US",
            "GB"
        ]
    },
    "shippingAddressRequired": true
}

我遵循了谷歌文档,但对我没有任何帮助

Edited

image3

image 4

image5

最佳答案

第一张图片显示“添加卡”屏幕。您正在尝试添加新的测试卡。这不会起作用并会导致 OR_CCREU_02。为了让 Google Pay 表在使用测试环境时显示测试卡,您必须加入此 Google 群组:https://groups.google.com/forum/#!forum/googlepay-test-mode-stub-data

加入群组后,使用您用于加入群组的同一 Google 帐户在测试环境中触发付款。现在,Google Pay 表应显示 PSP 支持的所有测试卡:

Google Pay payment sheet

更新:

对于 Braintree,请使用类似于以下内容的网关配置:

new JSONObject() {{
  put("type", "PAYMENT_GATEWAY");
  put("parameters", new JSONObject() {{
    put("gateway", "braintree");
    put("braintree:apiVersion", "v1");
    put("braintree:sdkVersion", "braintree.client.3.40.0");
    put("braintree:merchantId", "your_merchant_id");
    put("braintree:clientKey", "your_client_key");
  }});
}};

关于kotlin - 我们无法完成此操作。尝试其他付款方式或联系我们。 [OR_CCREU_02],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75862955/

相关文章:

android - 类 'action' 不是抽象的,没有实现抽象成员 public abstract val actionId : Int defined in androidx. navigation.NavDirections

e-commerce - 使用手机实现支付

google-pay - CRYPTOGRAM_3DS – 为什么它不能作为唯一的选择?

android - 在Dao中使用@Query时,房间[exception:KaptExecution]

java - 为什么从 ViewModel 进行调用时,Retrofit enqueue 不起作用?

php - 回显函数值不会传递给表单

google-pay - Google PAY API - LoyalityObject 与 LoyalityClass

javascript - Google Pay 是否计算销售税?

android - 具有自定义属性的 ObjectAnimator 不调用属性 setter

ios - 哪个是 iOS 应用程序中购买服务的最佳支付网关?