我从 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
最佳答案
第一张图片显示“添加卡”屏幕。您正在尝试添加新的测试卡。这不会起作用并会导致 OR_CCREU_02
。为了让 Google Pay 表在使用测试环境时显示测试卡,您必须加入此 Google 群组:https://groups.google.com/forum/#!forum/googlepay-test-mode-stub-data
加入群组后,使用您用于加入群组的同一 Google 帐户在测试环境中触发付款。现在,Google Pay 表应显示 PSP 支持的所有测试卡:
更新:
对于 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/