Forums / PayPal Express Checkout support / Help With PayPal Express on MySQL 5

Help With PayPal Express on MySQL 5

Locked

Started by mitchcecg on 17 Feb 2007, 3:10 PM · Views: 6,036

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
17 Feb 2007, 3:10 PM
#1
mitchcecg avatar

mitchcecg

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Help With PayPal Express on MySQL 5

I have been working on getting PayPal Express checkout to work for the last 2 days UNSUCCESSFULLY.
Firstly PayPal IPN does work
I started with the 1.3.7 base added the apple zen template I have patched the paypal module with both the FEB 8th and the Feb 15th patch I have set up a sandbox account for testing and have the appropriate credentials.
If I turn on debugging /logging or logging with email and I return from paypal I just get a blank explorer screen. No log file is created.
When I have debugging off and I complete the checkout I am taken to a paypal login screen after logging in it shows no $amounts on it just basically has a pay now button when clicked it returns to zencart/mysite with the following message

“we were not able to process your order. Please try again, select an alternate payment method, or contact the store owner for assistance. (Transaction refused because of an invalid argument. See additional error messages for details.)”
Any help would be appreciated

THANX
MITCHCECG

17 Feb 2007, 3:20 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Help With PayPal Express on MySQL 5

See if the February 15th patch helps you ... PayPal changed some things the other day ... surprise surprise surprise ... :eek:

http://www.zen-cart.com/forum/showthread.php?t=56216

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 Feb 2007, 3:21 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Help With PayPal Express on MySQL 5

NOTE: the sandbox is using one set of constants and the Live site another ... go figure? :blink:

Switch to Live ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 Feb 2007, 4:36 PM
#4
mitchcecg avatar

mitchcecg

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

Thanks for getting back to me so quickly

I turned on live and set the appropriate credentials
Paypal Processes the order
However, when I return to ZenCart I now get the following ERROR

1292 Incorrect datetime value: '2007-02-17T16:29:15Z' for column 'payment_date' at row 1
in:
[INSERT INTO hi_paypal (zen_order_id, txn_type, reason_code, payment_type, payment_status, pending_reason, invoice, first_name, last_name, payer_business_name, address_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_id, payer_status, payment_date, business, receiver_email, receiver_id, txn_id, parent_txn_id, num_cart_items, mc_gross, mc_fee, mc_currency, settle_amount, settle_currency, exchange_rate, notify_version, verify_sign, date_added, memo) VALUES ('5', 'cart', 'None', 'PayPal Express Checkout (instant)', 'Completed', 'None', 'EC-1KK28351KK007574U', 'test', ‘user', '', 'test user', '2000 Lenox Drive, Suite 100', 'Lawrenceville', 'NJ', '08648', '', 'Confirmed', '[email protected]', 'LRW9TN2L5E49S', 'verified', '2007-02-17T16:29:15Z', '', 'admin.cecg.com', '', '1C857737LF707714E', '', '1', '0.01', '0.01', 'USD', '0', 'USD', '1', '', '', now(), '')]

Any Ideas
Thanks in advance
MITCHCECG

17 Feb 2007, 6:01 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Help With PayPal Express on MySQL 5

Hmmm ... will have to dig on that one. That date is supposed to be translated before insertion into the database, hence the error.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Feb 2007, 6:43 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Help With PayPal Express on MySQL 5

I just made a clean install of v1.3.7 ...

Tried checkout which naturally fails ...

Then applied the Patch for February 15th ... and all is working ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Feb 2007, 3:16 AM
#7
mitchcecg avatar

mitchcecg

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

OK now I feel dumb. I have reapplied the feb 15th patch and I am still getting the "1292 Incorrect datetime value error".
I am at a total loss as to solving this mistery any help would be appreciated

THANX
MitchCECG

18 Feb 2007, 3:19 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Help With PayPal Express on MySQL 5

While this is a pain to do on a test ...

Can you make a test directory with a test database with the demo data ... from a clean Zen Cart v1.3.7 ... and apply the February 15th patch ...

Then set this up for your PayPal Express ... make sure you are set to Live ...

Do you still get this date error?

So far I just cannot reproduce this at all on a clean install with the February 15th patch ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Feb 2007, 3:39 AM
#9
mitchcecg avatar

mitchcecg

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

I will do that on Monday if we don't reach a resolution before then.
FYI This is a clean install which is not live yet I have added a few items to the cart and am using the apple zen template. I applied the FEB 8th patch before I applied the FEB 15th patch if that is a clue to the problem.

You can view the site at igethigh.cecg.com and I am able to give you remote access to the server if you desire since it is at my location and not a hosting service
I will be out of town most of tomorrow (Sunday) but should be back in the evening.

Thanks again for the help

MitchCECG

18 Feb 2007, 3:47 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Help With PayPal Express on MySQL 5

Drop me a PM when you get back ... maybe we can work out what the issue is ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Feb 2007, 10:46 AM
#11
potzuk avatar

potzuk

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

For the record, I'm also getting this error message. It's a completely fresh install and I'm using the Feb 15th patch. It's running on Win2k, IIS and MySQL 5.

I'm also using the UK Paypal, I know that's caused issues with the shipping address, which I've gotten around by using the hardcoding 'GB' fix from another thread.

1292 Incorrect datetime value: '2007-02-19T09:58:20Z' for column 'payment_date' at row 1

19 Feb 2007, 11:05 AM
#12
potzuk avatar

potzuk

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

Reckon the problem lies in the parsing in this function:

function datetime_to_sql_format($paypalDateTime) {
//Copyright (c) 2004 DevosC.com
$months = array('Jan' => '01', 'Feb' => '02', 'Mar' => '03', 'Apr' => '04', 'May' => '05', 'Jun' => '06', 'Jul' => '07', 'Aug' => '08', 'Sep' => '09', 'Oct' => '10', 'Nov' => '11', 'Dec' => '12');
$hour = substr($paypalDateTime, 0, 2);$minute = substr($paypalDateTime, 3, 2);$second = substr($paypalDateTime, 6, 2);
$month = $months[substr($paypalDateTime, 9, 3)];
$day = (strlen($day = preg_replace("/,/" , '' , substr($paypalDateTime, 13, 2))) < 2) ? '0'.$day: $day;
$year = substr($paypalDateTime, -8, 4);
if (strlen($day)<2) $day = '0'.$day;
return ($year . "-" . $month . "-" . $day . " " . $hour . ":" . $minute . ":" . $second);
}

But I'm not an expert enough to figure it out! Maybe adding another step to change the T to a space and to drop the Z off the date that's getting sent to the database?

19 Feb 2007, 5:31 PM
#13
mitchcecg avatar

mitchcecg

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

To PotzUK
Just to see if there are any other commonalities
did you install any add-ons or templates

19 Feb 2007, 11:46 PM
#14
mitchcecg avatar

mitchcecg

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

Linda
It looks like I am not the only one with this problem.
I have tried a reinstall in a different virtual dir on IIS and it does not work no matter what I do.
Let me know when we can communicate I have PM’d you with my contact info
THANX

21 Feb 2007, 6:07 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Help With PayPal Express on MySQL 5

Mitch,

I have duplicated the problem you mention using a test windows server running PHP 5 and MySQL 5.

I took the same SQL statement that's failing on MySQL 5 and ran it on a MySQL 4 server, without error.

It seems that MySQL 5 (if running in strict_trans mode) disallows auto-translation from the supplied date data to MySQL date format.

I'm now working on a translator so we send the right format to the database, to accomodate the MySQL 5 enforced standards ...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Feb 2007, 6:17 AM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Help With PayPal Express on MySQL 5

/me continues to twist the good DrBytes arm on this one ... or else go bald ... :cry:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Feb 2007, 6:19 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Help With PayPal Express on MySQL 5

:eek: .......

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Feb 2007, 6:33 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Help With PayPal Express on MySQL 5

Here's the skinny:

Based on the Feb 19 patch, make these changes:
/includes/modules/payment/paypalwpp.php

line 780 says:

                          'payment_date' => $this->payment_time,

change to:

                          'payment_date' => trim(preg_replace('/[^0-9-:]/', ' ', $this->payment_time)),

line 793 says:

                          'notify_version' => '',

change to:

                          'notify_version' => '0',

Ajeh is doing some testing to be sure she, er, um, I didn't bust nothin ...

UPDATE: Patch issued:
http://www.zen-cart.com/forum/showthread.php?p=332514#post332514

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Feb 2007, 2:39 PM
#19
mitchcecg avatar

mitchcecg

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

:yes: Thanks all for the help. It is now working You nailed it.

MITCHcecg

22 Feb 2007, 8:40 AM
#20
potzuk avatar

potzuk

New Zenner

Join Date:
Feb 2007
Posts:
19
Plugin Contributions:
0

Re: Help With PayPal Express on MySQL 5

Confirmed, that did the trick :)