Support » Plugin: WooCommerce Square » Status code CARD_TOKEN_USED

  • Resolved Derek Wilcox

    (@themassapothecary)


    Square Payment Failed (Status code CARD_TOKEN_USED: Card nonce already used with a different idempotency key; please request new nonce.)

    This is the error a customer of mine just got when she tried to pay with Apple Pay at checkout. I spoke with Square and they said that it seems like my API is not creating a new card nonce after each submit. Please help. What is wrong here?

    Also, a separate problem. Doesn’t Square checkout usually give the option for a customer to save their card info if they want? Because there is no option right now and every single order it says card info has been saved.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Derek Wilcox

    (@themassapothecary)

    HELP PLEASE

    Plugin Support Ena P (a11n)

    (@drwpcom)

    Hi @themassapothecary. Usually, this error is caused by a conflict on your site. I recommend that you do a conflict test to see which plugin is causing the error Status code CARD_TOKEN_USED: Card nonce already used with a different idempotency key; please request new nonce and also forces the payment card to be saved for every order. Those two issues are likely related.

    We have a document here to guide you through conflict testing – https://docs.woocommerce.com/document/how-to-test-for-conflicts/.

    I hope that points you in the right direction. It would be great if you would report back how it goes.

    Thread Starter Derek Wilcox

    (@themassapothecary)

    @drwpcom ok so how do I test for nonce error with test Google Pay orders or test Apple Pay orders?

    Also, this guide is a very general guide and has nothing to do with this plugin specifically. I get the idea but whats best way to test on Square Woo plugin?

    Should I do test orders paying in sandbox mode with test credit cards? If so, how do I do test orders paying with Apple pay or Google pay? Especially if I don’t have any Apple devices?

    Plugin Support Mike a11n

    (@nixiack8)

    Hi @themassapothecary,

    Sorry to hear the issue is still happening still. Card Nonce errors are almost always caused by theme issues, where the theme interferes with the data being passed to Square. This is seen where themes override the Cart/Checkout pages, usually with the Checkout Form area. Plugins can also do this, but most commonly it’s improperly coded themes.

    so how do I test for nonce error with test Google Pay orders or test Apple Pay orders?

    It is the same with troubleshooting other payment plugins that have Google Pay/Apple Pay built into them (Stripe, for example). As a first step in troubleshooting, I’d recommend changing to the default Twenty Seventeen or Storefront theme and then trying again. If that doesn’t help, you’ll want to check for plugins that are interfering with the values sent to Square. To do that disable all plugins, except for WooCommerce and the WooCommerce Square.

    this guide is a very general guide and has nothing to do with this plugin specifically. I get the idea but whats best way to test on Square Woo plugin?

    It is a general guide because it is essentially a ‘general’ issue – something is blocking the information from getting to Square, so the best thing to do is disable/switch items off until the system starts working. Once it does, re-enable each item one (or a few) at a time, and test in-between. The last thing that was activated when the issue re-occurs is the culprit.

    Should I do test orders paying in sandbox mode with test credit cards? If so, how do I do test orders paying with Apple pay or Google pay?

    That would be best, and Sandbox instructions for Square is at this link. The plugin itself allows for Google/Apple Pay buttons so just having it + WooCommerce active (and your shipping plugin if it is one that requires to be on like USPS/UPS/etc) should suffice for testing.

    To test orders with Google and/or Apple Pay, be sure to be on a platform that works for both – Google works with Chrome in general, and any Android device with the Google Pay app installed. Apple Pay has a list of compatible devices that works with it, to test you would need to get one to ensure. Common troubleshooting steps for Apple Pay itself is found at this link.

    I hope that helps! Do let us know how it goes 🙂

    Thread Starter Derek Wilcox

    (@themassapothecary)

    @nixiack8 i found out the cause of credit cards not seeing the checkbox to save info was Woo Funnels. I don’t know if that’s the cause of Apple & Google Pay not working too. But bigger issue is I want to keep Woo Funnels. Do you guys have any experience with compatibility with Square For Woo & Woo Funnels?

    Plugin Support Mike a11n

    (@nixiack8)

    Hi @themassapothecary,

    It is good that the issue was narrowed down – Woo Funnels eh? Woo Funnels does do amazing things with converting key information from checkout pages into excellent data options, but it is highly customizable so I can see where it might interrupt information going to a particular gateway (in this case Square).

    We have not had much of a history with Woo Funnels conflicting with Square in particular, I would definitely reach out to the developers of Woo Funnels at this link and let them know Square is not functioning as a payment gateway with just Woo Funnels, Square and WooCommerce activated.

    That allows them to know everything else was ruled out, and they can take a look to ensure the information they need to gather for their items is not conflicting with the information Square requires.

    If you like, let us know what they say!

    Thread Starter Derek Wilcox

    (@themassapothecary)

    @nixiack8 ok so I spoke with Woo Funnels developers. The problem with –

    Status code CARD_TOKEN_USED: Card nonce already used with a different idempotency key; please request new nonce.

    And Apple Pay & Google Pay not working has nothing to do with woo funnels.

    As far as every card being saved, all they do is automatically have save card to account checked off and checkbox hidden so that order upsells work.

    What now?

    Thread Starter Derek Wilcox

    (@themassapothecary)

    @nixiack8 @drwpcom

    I also just did a test with Google Pay checkout after turning on error logs in Square settings. So, I have the error log with a failed payment through Google Pay as well. Is there a way for me to send to you not on open forum?

    Plugin Support Aashik P. a11n

    (@aashik)

    So, I have the error log with a failed payment through Google Pay as well. Is there a way for me to send to you not on open forum?

    What do you think about sharing the logs after REDACTING any sensitive data?

    You can use a service like https://pastebin.com/ to then automatically trash the logs after a week or two.

    [Please make sure that you redact any private details, including address, name, email address, transaction details, API Keys, Passwords, etc]

    Plugin Support Aashik P. a11n

    (@aashik)

    Howdy!

    We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please start a new thread.

    Cheers!

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.