I followed the Walkthrough but met the err 500


I followed this instruction: https://developer.squareup.com/docs/payment-form/payment-form-walkthrough

But I’m failed and have no idea on where to check the log. Please advice. Thanks!

Hi @Yulia welcome to the forums!

Can you clarify where you’re seeing the error 500? The code in the walkthrough should be printing out the successful payment or the error, I believe. Feel free to provide your Square app id and I can try taking a look at the logs on our side as well.

Hi sjosey,

This line below popups the failure status.
alert(‘Payment failed to complete!\nCheck browser developer console for more details’);

And I checked the console. it shows

My square app id is sandbox-sq0idb-b0c0E9guIyHD3POQu-x5Fw

Thank you! Really appreciate it!

If you expand “result” it should show you the cause of the failure. Looking it up in our logs, though, the error is:

"This business can only process payments in AUD but amount was provided in USD."

so you need to change “USD” to “AUD” in the CreatePayment request.

Thank you!!! Totally ignored there was an “expand” symbol…

1 Like