braintree / braintree-web-drop-in

Braintree Drop-in for the web
MIT License
200 stars 126 forks source link

DropinError No valid payment options available #599

Closed julyL closed 4 years ago

julyL commented 4 years ago

General information

Issue description

            asyncLoadJs(
              '//js.braintreegateway.com/web/dropin/1.22.1/js/dropin.min.js'
            ).then(() => {
              var button = document.querySelector('#submit-button');
              braintree.dropin.create(
                {
                  authorization: res.client_token,
                  container: '#dropin-container'
                },
                function(createErr, instance) {
                  console.log(createErr, instance);
                  button.addEventListener('click', function() {
                    instance.requestPaymentMethod(function(err, payload) {
                      // Submit payload.nonce to your server
                    });
                  });
                }
              );
            });

createErr return {name: "DropinError", message: "No valid payment options available.", _braintreeWebError: undefined}

How to resolve it ? I can not found the solution in document?

I test in local address, the url protocol is http, but the sdk send https request to paypal server

crookedneighbor commented 4 years ago

My suspicion is that your account is not set up to process credit cards.

Contact our support team and reference this issue so we can inspect your account to determine what's going wrong. https://help.braintreepayments.com/