PayPal IPN - 1292 Incorrect datetime value
After upgrading to 1.3.8 I noticed that the following error message is displayed after placing an order and paying using the PayPal IPN module.
Quote:
1292 Incorrect datetime value: '09:03:49 03 2007' for column 'payment_date' at row 1
Has anyone else experienced this problem?
Re: PayPal IPN - 1292 Incorrect datetime value
Just fixed this issue.
After turning off the MySQL 'strict mode' the PayPal pament module is now working as it should.
Re: PayPal IPN - 1292 Incorrect datetime value
Hi,
My first post. We had the same issue, the problem is we use hosting on windows
server, where the MySQL is shared, so our host refused to do any changes as
suggested.
The solution was to dig around the code, i am not PHP programmer, but i have
tryed my best. To fix, open:
/includes/modules/payment/paypal.php
goto after_process(), then find the part where the paypal data is filled into the
array:
Code:
'payment_date' => trim(preg_replace('/[^0-9-:]/', ' ', $this->pdtData['payment_date'])),
replace with this:
Code:
'payment_date' => $this->datetime_to_sql_format($this->pdtData['payment_date']),
Well, i hope this will help somebody.
we are on MySQL 5.0.x
and ZC 1.3.8
Regards, Chris
Re: PayPal IPN - 1292 Incorrect datetime value
Thanks for the posts. I had the same error and the fixes provided here worked for me.
Thanks again.
Re: PayPal IPN - 1292 Incorrect datetime value
Ok, I have just recently discovered zencart and I am absolutely blown away by the community here. I have found an answer to every potentially catastrophic issue making the whole implementation and modding process fantastic!
Yet again, I had this exact problem and your step by step explanation coupled with user confirmation is exceptional.
To all out there, you are awesome. Keep up the great work.
Re: PayPal IPN - 1292 Incorrect datetime value
I made the change above, but get a blank page now.
Is there any chance someone could post the php file for this alteration.
I am using the latest Version 1.3.8
Re: PayPal IPN - 1292 Incorrect datetime value
Quote:
Originally Posted by
directprint
I made the change above, but get a blank page now.
https://www.zen-cart.com/tutorials/index.php?article=82
Re: PayPal IPN - 1292 Incorrect datetime value
fantastic.
Running windows server 2003, IIS6, PHP5, MYSQL 5 and the FIX posted above fixed my problem.
CONGRATULATIONS
Re: PayPal IPN - 1292 Incorrect datetime value
I changed the code and after returning from PP got this:
Fatal error: Call to undefined method paypal::datetime_to_sql_format() in /home2/midwest/public_html/includes/modules/payment/paypal.php on line 412
please help...
Re: PayPal IPN - 1292 Incorrect datetime value
Perhaps you're working with an incompatible version of Zen Cart?