react-square-web-payments-sdk
react-square-web-payments-sdk copied to clipboard
Invalid parameter format for ACH tokenize
Describe the bug
This package has worked well with my Square sandbox account. After I switched to the production environment, I am unable to make ACH payments.
Your Example Website or App
https://stackblitz.com/edit/vitejs-vite-bsyrq3?file=src%2FApp.jsx
Steps to Reproduce the Bug or Issue
- Click the ACH payment button.
- Notice the error in the console.
Expected behavior
I expect the ACH payment button to open the payment modal when clicked. Instead what I'm seeing is the following error:
square.js:3 InvalidOptionError: option: 'Invalid parameter format for ACH tokenize'
at square.js:3:222416
at Generator.next (<anonymous>)
at Lc (square.js:3:220506)
at s (square.js:3:220710)
at square.js:3:220771
at new Promise (<anonymous>)
at square.js:3:220650
at kc.tokenize (square.js:3:224254)
at Object.handlePayment (ach.tsx:64:1)
at HTMLButtonElement.<anonymous> (use-event-listener.ts:31:1)
at HTMLButtonElement.n (square.js:3:99306)
(anonymous) @ square.js:3
overrideMethod @ console.js:288
handlePayment @ ach.tsx:82
await in handlePayment
(anonymous) @ use-event-listener.ts:31
n @ square.js:3
Screenshots or Videos
Platform
- OS: Windows
- Browser: Chrome
- Version: 3.2.1
Additional context
The same code works fine when I replace the application ID and the locationId with the sandbox values.