'The given data was invalid React and Commerce JS
I am currently following a tutorial on how to build a web commerce website (His GitHub: https://github.com/adrianhajdin/project_e_commerce) and I am getting this error when submitting data:
and looking at the response I see this:
I haven't got a clue what this means and been stuck for at least 3 hours trying to fix this.
The stripe payment is actually logging it as a successful logs.
But within Commerce JS it detects the errors:
Solution 1:[1]
Check the information of the orderData object, something must have been misspelled, as suggested by the error "The given data was invalid". In my case the problem was that the instructor indicated to access the property of the shippingObject as "address1", but I had that property defined as "address" without the number 1, enough to give me a delay of 20+ minutes, watch out for that and check carefully your orderData object
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Joan Gavelán |





