Jump to content
thirty bees forum
  • 0

Stripe Module Validation Failed


Question

Posted

Hi,

We have installed stripe module and testing it in in the test mode. During checkout it redirect to stripe website to enter the credit card information and stripe is successfully complete the transaction. Once the transaction is completed and returns back to TB, it shows "Failed to validate order" 

we checked in stripe module> Stripe Transaction tab it shows "Charge Failed"

Any ideas, how to fix this issue?

image.png.5abc957ff2a42efed371226daf2a9b13.png

  • Like 2

15 answers to this question

Recommended Posts

  • 0
Posted (edited)

Failed to validate order

Has anyone else found a solution?
I got this error message after ordering myself something with a live card. The card was charged and the order shows in the back office. The same thing happened to a customer this morning.

I'm on bleeding edge version 1.3 and PHP 8.

Edited by veganline
version
  • 0
Posted (edited)

Still failing on version 1.2 and PHP 7.4 unfortunately.
Stripe shows the payment initially "incomplete", which I suppose triggers the error, and then as complete.

It might be relevant that my email notifications haven't worked since late September; I don't know what I did to break them.

---added
The Stripe site has an error message next to the first failed payment
"
The PaymentIntent requires a payment method

Set an existing payment method on the PaymentIntent or have the customer enter a new payment method.
Learn more"

Then a couple of seconds later, the payment goes-through after triggering the error message.
If you click on the links to find out more, your find a blank page on the Stripe site.
 
---added 
After changing back to 1.7.0 and forward again to 1.7.1 I get a different error message in black under the inline Stripe form: 
No such payment_intent: 'pi_3JklsDGngIXhdSwB05cBtIoo'; a similar object exists in live mode, but a test mode key was used to make this request.
Edited by veganline
  • 0
Posted

Looks like when you updated module, its configuration was reset, and it's back in testing mode. The payment intent is stored in cookie, and is no longer valid.

Please check module configuration and switch it to live mode, if that's what you are testing. Also, clear browser cache / cookies.

  • Like 1
  • 0
Posted

Thanks! The payment worked, but the screen took me to

Example.com/module/stripe/validation?type=cc headed "payment error". I suppose I could change it somehow. It shows this error message and a button to go back to the shopping cart
 

 An error occurred:
  • Failed to validate order
  • 0
Posted

The root cause is well hidden... this module does excellent job hiding everything important from everybody

Edit file modules/stripe/classes/PaymentProcessor.php, find line

this->addError($this->l('Failed to validate order'), (string)$e);

and change it to look like this:

d("$e");
$this->addError($this->l('Failed to validate order'), (string)$e);

The d("$e") should display additional information when error happen. Hopefully we can use this info to figure out what's actually wrong

  • Like 1
  • 0
Posted

Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345 Stack trace: #0 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('') #1 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(592): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(432): Swift_Mime_SimpleMimeEntity->_setHeaderFieldModel('Bcc', Array) #5 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(412): Swift_Mime_SimpleMessage->setBcc(Array) #6 /home/veganlin/public_html/classes/Mail.php(293): Swift_Mime_SimpleMessage->addBcc(NULL) #7 /home/veganlin/public_html/modules/mailalerts/mailalerts.php(702): MailCore::Send(1, 'new_order', 'new order: #168...', Array, 'shop@veganline....', '', 'shop@veganline....', 'Veganline.com', NULL, NULL, '/home/veganlin/...', NULL, 1) #8 /home/veganlin/public_html/classes/Hook.php(769): MailAlerts->hookActionValidateOrder(Array) #9 /home/veganlin/public_html/classes/Hook.php(471): HookCore::coreCallHook(Object(MailAlerts), 'hookactionValid...', Array) #10 /home/veganlin/public_html/classes/Hook.php(288): HookCore::execWithoutCache('actionValidateO...', Array, NULL, false, true, false, NULL) #11 /home/veganlin/public_html/classes/module/PaymentModule.php(967): HookCore::exec('actionValidateO...', Array) #12 /home/veganlin/public_html/modules/stripe/classes/PaymentProcessor.php(208): PaymentModuleCore->validateOrder(431, 1, 1.51, 'Stripe: Credit ...', NULL, Array, NULL, false, '98dc27777291456...') #13 /home/veganlin/public_html/modules/stripe/classes/PaymentProcessor.php(116): StripeModule\PaymentProcessor->processCharge(Object(Cart), Object(ThirtyBeesStripe\Stripe\Charge), Object(ThirtyBeesStripe\Stripe\PaymentIntent)) #14 /home/veganlin/public_html/modules/stripe/controllers/front/validation.php(153): StripeModule\PaymentProcessor->processPayment(Object(Cart), Object(ThirtyBeesStripe\Stripe\PaymentIntent)) #15 /home/veganlin/public_html/modules/stripe/controllers/front/validation.php(127): StripeValidationModuleFrontController->processPayment(Object(Cart), Object(ThirtyBeesStripe\Stripe\PaymentIntent)) #16 /home/veganlin/public_html/modules/stripe/controllers/front/validation.php(98): StripeValidationModuleFrontController->processPaymentIntent('pi_3Jknq0GngIXh...') #17 /home/veganlin/public_html/modules/stripe/controllers/front/validation.php(59): StripeValidationModuleFrontController->validateCreditCard() #18 /home/veganlin/public_html/classes/controller/Controller.php(197): StripeValidationModuleFrontController->postProcess() #19 /home/veganlin/public_html/classes/controller/FrontController.php(255): ControllerCore->run() #20 /home/veganlin/public_html/classes/Dispatcher.php(852): FrontControllerCore->run() #21 /home/veganlin/public_html/index.php(33): DispatcherCore->dispatch() #22 {main}
END

  • 0
Posted (edited)

Might be relevant: I have some override files. I do not know where they came from. 

AuthController.php
33.4 KB
Today, 12:10 PM
OrderOpcController.php
39 KB
Today, 12:10 PM
ContactController.php
   3.1 KB
Sep 17, 2021


------------------
Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345 Stack trace: #0 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('') #1 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(592): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(432): Swift_Mime_SimpleMimeEntity->_setHeaderFieldModel('Bcc', Array) #5 /home/veganlin/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(412): Swift_Mime_SimpleMessage->setBcc(Array) #6 /home/veganlin/public_html/classes/Mail.php(293): Swift_Mime_SimpleMessage->addBcc(NULL) #7 /home/veganlin/public_html/classes/module/PaymentModule.php(1099): MailCore::Send(1, 'order_conf', 'automatic ackno...', Array, 'shop@veganline....', 'John Robertson', 'shop@veganline....', 'Veganline.com', NULL, NULL, '/home/veganlin/...', false, 1) #8 /home/veganlin/public_html/modules/stripe/classes/PaymentProcessor.php(208): PaymentModuleCore->validateOrder(434, 1, 1.51, 'Stripe: Credit ...', NULL, Array, NULL, false, '98dc27777291456...') #9 /home/veganlin/public_html/modules/stripe/classes/PaymentProcessor.php(116): StripeModule\PaymentProcessor->processCharge(Object(Cart), Object(ThirtyBeesStripe\Stripe\Charge), Object(ThirtyBeesStripe\Stripe\PaymentIntent)) #10 /home/veganlin/public_html/modules/stripe/controllers/front/validation.php(153): StripeModule\PaymentProcessor->processPayment(Object(Cart), Object(ThirtyBeesStripe\Stripe\PaymentIntent)) #11 /home/veganlin/public_html/modules/stripe/controllers/front/validation.php(127): StripeValidationModuleFrontController->processPayment(Object(Cart), Object(ThirtyBeesStripe\Stripe\PaymentIntent)) #12 /home/veganlin/public_html/modules/stripe/controllers/front/validation.php(98): StripeValidationModuleFrontController->processPaymentIntent('pi_3JkooXGngIXh...') #13 /home/veganlin/public_html/modules/stripe/controllers/front/validation.php(59): StripeValidationModuleFrontController->validateCreditCard() #14 /home/veganlin/public_html/classes/controller/Controller.php(197): StripeValidationModuleFrontController->postProcess() #15 /home/veganlin/public_html/classes/controller/FrontController.php(255): ControllerCore->run() #16 /home/veganlin/public_html/classes/Dispatcher.php(852): FrontControllerCore->run() #17 /home/veganlin/public_html/index.php(33): DispatcherCore->dispatch() #18 {main}
END

Edited by veganline
overrides
  • 0
Posted

The root cause is here:

/home/veganlin/public_html/classes/Mail.php(293): Swift_Mime_SimpleMessage->addBcc(NULL)

The system is adding null BCC address. Now, the question is why.

  • Do you have some module that hooks to hook actionEmailSendBefore?
  • check BCC all mails to configuration option in Advanced Parameters > Emails
  • can you PM me access to your back office?

 

  • Like 1
  • 0
Posted

You've solved it!
I had BCC all emails turned-on under Advanced Parameters > Emails
When I turned it off, the error message was gone. 
I'll PM access to the back office in case there is anything you're curious about.

  • 0
Posted
8 minutes ago, veganline said:

You've solved it!
I had BCC all emails turned-on under Advanced Parameters > Emails
When I turned it off, the error message was gone. 
I'll PM access to the back office in case there is anything you're curious about.

Still weird. The controller code verifies that the list of bcc addresses is valid, this should not result with null item. I tried to reproduce the issue, but without success...

  • 0
Posted
Quote

Do you have some module that hooks to hook actionEmailSendBefore?

Is there a way to test for this? The
"An error occured:

  • failed to validate order"

problem  on Stripe has returned unfortunately

  • 0
Posted (edited)
On 2/19/2024 at 3:34 PM, veganline said:
Is there a way to test for this? The
"An error occured: * failed to validate order" problem on Stripe has returned unfortunately

eMagicOne Store Manager Bridge Connector, version 3.0.13 - by eMagicOne was the problem

The Storemanager system doesn't update automatically but there is a current module for PS1.6:

eMagicOne Store Manager Bridge Connector, v3.1.7 - by eMagicOne

Storemanager was a way of tweaking the store data from a separate screen, which claimed to have an add-on that could synchronize Prestashop 1.6 and Ebay. That's why I bought the thing dispite never getting it to work. There was also an android app that could read your back office apparently, but I can't make it work today.


...has the same problem. I am using Thirtybees 1.6.0 on PHP 8.0.30 with no regular error messages except

I forgot that I had the module as I have never managed to make the thing work, so turning it off is no problem. I'm just adding detail for reference in case anyone else finds the same thing

Error logs included a notice from about the time I installed the updated module

Message:  Only variables should be passed by reference

Location: modules/bridgeconnector/functions/for_ajax.php line 308

I can pass-on more detail if anyone is interested.

Edited by veganline

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...