Невозможно, чтобы поле cardholderName появилось в выпадающем списке Braintree - PullRequest
0 голосов
/ 20 июня 2019

Я интегрирую Braintree в существующий сайт и работаю хорошо, чтобы успешно продавать в песочнице.Однако, когда я пытаюсь добавить поле carderholderName, оно не появится в форме.Мой код выглядит следующим образом.

<div id="braintree-payment-form"></div>

<script>
     braintree.setup(clientToken, "dropin", {
        container: 'braintree-payment-form',
        amount: 10.00,
        vaultManager: true,
        card: {
            cardholderName: {
                required: true
            }
        },
        paypal: {
            button: {
                type: 'checkout'
            }
        },
        currency: 'AUD',
        enableBillingAddress: true,
        onUnsupported: '/braintree/notSupportedByBrowserCallbackURL',
        onCancelled: '/braintree/onCancelCallbackURL',
        onSuccess: '/braintree/onSuccessfulURL',
        billingAgreementDescription: 'Agreement to agree by client on PayPal description',
        onError: function (obj) {
            if (obj.type === 'VALIDATION') {
                // Validation errors contain an array of error field objects:
                console.log(obj.details.invalidFields);

            } else if (obj.type === 'SERVER') {
                // If the customer's browser can't connect to Braintree:
                console.log(obj.message); // "Connection error"

                // If the credit card failed verification:
                console.log(obj.message); // "Credit card is invalid"
                console.log(obj.details); // Object with error-specific information
            }
        }
    });
</script>

Кто-нибудь может понять, почему поле cardholdersName не появится в форме?

...