After moving the DB from PROD to STAGING for the admin account, the following errors appear:

  26936252   12/Mar 07:44   php              Error      Drupal\Core\Entity\EntityStorageException: No such payment_intent: 'pi_XXX'; a similar object exists in live mode, but a test mode key was used    
                                                        to make this request. i                                                                                                                                                 
  26936251   12/Mar 07:44   commerce_order   Error      Stripe\Exception\InvalidRequestException: No such payment_intent: 'pi_XXX'; a similar object exists in live mode, but a test mode key was used to  
                                                        make this request. in     

Comments

vmarchuk created an issue.

vmarchuk’s picture

If in our case it is due to using PaymentIntent::retrieve($intent_id) without a try-catch.

martin@manarock.co.uk’s picture

I have had this, drove me made for a few hours - eventually started another payment request in incognito mode - which gave me a new session, and everything worked. Any chance its down to the same session ID in the browser?