Closed Stradivario closed 1 year ago
npm i braintree-web-drop-in npm i @types/braintree-web-drop-in -D
import { create } from 'braintree-web-drop-in'; const container = document.body.querySelector('#dropin-container') as HTMLElement; const button = document.body.querySelector('#paypal-button') as HTMLElement; async function main() { const dropin = await create({ authorization: 'my-authorization-from-backend-goes-here', container, paypal: { flow: 'vault', }, }); button.addEventListener('click', () => { /* dropin.requestPaymentMethod(); */ }); } main();
<div id="dropin-container"></div> <button id="paypal-button">Purchase</button> <script type="text/javascript" src="./main.ts"></script>
I am having the following error
Error: Document is ready and element #braintree--dropin__f17298d9-3646-4ede-8a49-c911e83ee72e [data-braintree-id="paypal-button"] does not exist
Do you have a staging site we can inspect?
Just pinging again about getting a staging site.
closing for inactivity. If you continue to encounter errors, please contact Support
General information
Issue description
Steps to reproduce
I am having the following error
Error: Document is ready and element #braintree--dropin__f17298d9-3646-4ede-8a49-c911e83ee72e [data-braintree-id="paypal-button"] does not exist