BrainTree Drop In 3D Secure - payload.liabilityShifted不在有效载荷中

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

我试图在我的大脑树中打开3D Secure初始化,但它在paymentRequestMethod内失败,因为有效载荷永远不会返回liabilityShifted属性;

braintree.dropin.create({
    authorization: button.attr("data-client-token"),
    container: "#dropin-container",
    threeDSecure: {
        amount: Number(document.querySelector('[data-chargeable]')).toFixed(2),
    }
}, function( createErr, instance ) {
    button.on("click", function() {
        instance.requestPaymentMethod(function(requestPaymentMethodErr, payload) {
            console.log(payload);
            nonce = null;
            if(requestPaymentMethodErr) {
                return;
            }
            if (payload.liabilityShifted || payload.type !== 'CreditCard') {
                nonce = payload.nonce;
                button.hide();
                payButton.show();
            } else {
                button.hide();
                instance.clearSelectedPaymentMethod();
            }
        });
    });
});

无论我从选择中使用什么卡,责任转移都不在有效载荷中,类型总是信用卡;

{
    binData: {
        commercial: "Unknown",
        countryOfIssuance: "Unknown",
        debit: "Unknown",
        durbinRegulated: "Unknown",
        healthcare: "Unknown",
        issuingBank: "Unknown",
        payroll: "Unknown",
        prepaid: "Unknown",
        productId: "Unknown",
    },
    description: "ending in 11",
    details: {
        bin: "411111", 
        lastTwo: "11", 
        lastFour: "1111", 
        cardType: "Visa"
    },
    nonce: "tokencc_bf_95mrgx_75kwgh_d3qbzb_qy9vq3_b27",
    type: "CreditCard"
}

任何人都可以告诉我做错了什么。

问候

braintree
1个回答
0
投票

完全披露:我在Braintree工作。如果您有任何其他问题,请随时联系support

liabilityShifted表示3D Secure工作并且身份验证成功。您还需要确保使用3D Secure test cards来产生预期的3D安全响应。要在有效负载中获取liabilityShifted响应,您将需要使用verifyPayload对象。

© www.soinside.com 2019 - 2024. All rights reserved.