I'm trying to add the square payment form to my website and I'm getting the following error when running a production card (not in sandbox).
Response body:
object(stdClass)#7 (1) { ["errors"]=> array(1) { [0]=> object(stdClass)#6 (3) { ["category"]=> string(21) "INVALID_REQUEST_ERROR" ["code"]=> string(9) "NOT_FOUND" ["detail"]=> string(163) "Card nonce not found in this `production` application environment. Please ensure an application ID belonging to the same environment is used for the SqPaymentForm." } } }
Response headers:
array(12) { [0]=> string(22) "HTTP/1.1 404 Not Found" ["Content-Type"]=> string(16) "application/json" ["Vary"]=> string(23) "Origin, Accept-Encoding" ["X-Content-Type-Options"]=> string(7) "nosniff" ["X-Download-Options"]=> string(6) "noopen" ["X-Frame-Options"]=> string(10) "SAMEORIGIN" ["X-Permitted-Cross-Domain-Policies"]=> string(4) "none" ["X-Xss-Protection"]=> string(13) "1; mode=block" ["Date"]=> string(29) "Wed, 29 Mar 2017 00:03:37 GMT" ["Keep-Alive"]=> string(10) "timeout=60" ["Strict-Transport-Security"]=> string(17) "max-age=631152000" ["content-length"]=> string(3) "243" }
The application ID in both the square payment form and my process card php file are the same. Why am I getting this error? Thanks.
Could you share your application id, or a link to your code?
I found a place in the code that was still using the sandbox ID. I changed it to the application ID and that fixed the issue. It looks like it working now, as in, I was able to chage $1 to a card.
where was the old application ID that you found?
I am having the same issue.
Thanks!
Card nonce not found in this `sandbox` application environment . in my sandbox application id and transaction not charge how i can fix it?
Hi @alok, sorry for the delay. I checked in with our API Specialist team and they confirmed the following.
This will happen if you're using mismatched production and sandbox access token and application ids. To fix, you should make sure that:
Also remember when you want to change to production, you also need to change in both places as well.
The doc includes where to set the application id for the `sqpaymentform.js`: https://docs.connect.squareup.com/payments/sqpaymentform/sqpaymentform-setup#step-5-set-your-applica...
If you have any other questions let us know!
I have error like Card nonce not found in production mode. How to fix it?
Hi @BharathiPriyaK - Thanks for reaching out!
Sorry to hear that you're experiencing some difficulty.
Looks like what you're experiencing may be able to be solved using the troubleshooting steps provided by @Helen above.
If this does not resolve your issue our API engineers may have more troubleshooting steps, just reach out to our support to be put in touch with them.
Hi @BharathiPriyaK - Thanks for reaching out!
Sorry to hear that you're experiencing some difficulty.
Looks like what you're experiencing may be able to be solved using the troubleshooting steps provided by @Helen above.
If this does not resolve your issue our API engineers may have more troubleshooting steps, just reach out to our support to be put in touch with them.
Hi @BharathiPriyaK - Thanks for reaching out!
Sorry to hear that you're experiencing some difficulty.
Looks like what you're experiencing may be able to be solved using the troubleshooting steps provided by @Helen above.
If this does not resolve your issue our API engineers may have more troubleshooting steps, just reach out to our support to be put in touch with them.
Square Community