Google Pay 测试环境中出现 OR_BIBED_06 错误

问题描述 投票:0回答:1

我正在尝试在测试模式下为网站(不适用于 Android 应用)设置 Google Pay。我的处理器是 Fiserv - CardPointe,它表示使用 CARDCONNCT 作为网关。当 Google Pay 窗口弹出时,它会显示此错误。

出了点问题 该商家目前无法接受您的付款。尝试使用不同的付款方式。 [OR_BIBED_06] OR_BIBED_06

我在 Google 上没有看到太多有关此错误的信息。但我认为这是 Fiserv 的问题。这是我的代码

<script>
    function googlePayLoaded() {
        googlePayClient = new google.payments.api.PaymentsClient({ environment: 'TEST' });
        console.log("Google Pay Client loaded");
    }
</script>
<script id="googlePay" src="https://pay.google.com/gp/p/js/pay.js" async onload="googlePayLoaded()"></script>

启动时在捐赠页面上运行并创建按钮的代码

const allowedPaymentMethods = ["CARD", "TOKENIZED_CARD"];
const allowedCardNetworks = ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"];
googlePayMerchantID = settingValue(settings, "GooglePayMerchantID");
googlePayMerchantName = settingValue(settings, "GooglePayMerchantName");
// also called IsReadyToPayRequest in the docs
googlePayConfig = {
    apiVersion: 2,
    apiVersionMinor: 0,
    allowedPaymentMethods: allowedPaymentMethods
}
paymentDataRequest = Object.assign({}, googlePayConfig);
// currency code is ISO 4217 code
// country code is ISO 3166-1 alpha-2 code for where the transaction is processed
paymentDataRequest.transactionInfo = {
    totalPriceStatus: "FINAL",
    totalPrice: "0",  // will change this later
    currencyCode: "USD",
    countryCode: "US"
}
paymentDataRequest.merchantInfo = {
    merchantId: googlePayMerchantID,
    merchantName: googlePayMerchantName
}
const tokenizationSpec = {
    type: "PAYMENT_GATEWAY",
    parameters: {
        gateway: 'CARDCONNECT',
        gatewayMerchantId: CardPointeMerchantID
    }
}
const cardPaymentMethod = {
    type: "CARD",
    tokenizationSpecification: tokenizationSpec,
    parameters: {
        allowedCardNetworks: allowedCardNetworks,
        allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"]
        //billingAddressParamters: {
        //    format: "FULL",
        //    phoneNumberRequired: false
        //}
    }
}
paymentDataRequest.shippingAddressRequired = false;
paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];

googlePayClient.isReadyToPay(googlePayConfig).then(function (response) {
    if (response.result) {
        vm.showGooglePayOption = true;
        const googlePayButton = googlePayClient.createButton({
            buttonColor: "default",
            buttonType: "donate",
            onClick: donateWithGooglePay
            //allowedPaymentMethods: [cardPaymentMethod]
        });
        $("#googlePayButton").html(googlePayButton);
    } else {
        console.log("Google Pay not ready");
    }
}).catch(function (error) {
    console.log(error);
});

然后当您单击按钮时,它会执行此操作

function donateWithGooglePay2() {
    paymentDataRequest.transactionInfo.totalPrice = vm.data.amount.toString();
    googlePayClient.loadPaymentData(paymentDataRequest).then((paymentData) => {
        token = paymentData.paymentMethodData.tokenizationData.token;
        if (vm.paymentProcessor === "CardPointe") {
            tokenized = true;
            donate2();  // this uses the token to authorize a payment 
        }
    }).catch((error) => {
        // errors will be displayed in the Google Pay window
        console.log(error);
        return;
    });
}

有什么想法吗?

javascript payment-processing google-pay
1个回答
0
投票

Google Pay 令牌化过程中不会调用 Fiserv。在流程结束时使用

paymentData.paymentMethodData.tokenizationData.token
将令牌发送到您的后端,最后发送到 Fiserv 进行实际授权。

要消除

OR_BIBED_06
错误,请在代码中更改以下内容:

  1. tokenizationSpec
    对象中,它应该是
    parameters
    而不是
    paramters
  2. allowedAuthMethods
    数组中,它应该是
    CRYPTOGRAM_3DS
    而不是
    CRYPOGRAM_3DS
  3. totalPrice
    必须是字符串
© www.soinside.com 2019 - 2024. All rights reserved.