I'm following the instructions from here https://developers.braintreepayments.com/start/hello-client/javascript/v3
When I try braintree.dropin.create I have the following error:
https://api.sandbox.braintreegateway.com/merchants/parameters
Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'null' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access.
I'm doing the call from JavaScript v3, from localhost.
The Braintree site doesn't have any information on this issue. Google search doesn't help either.
UPD. Found solution. The problem was I tried the example from the local static html file. As soon as I run a server website (Express) and copied the code there everything worked as expected.