Checkout / Google Checkout Error

alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-10-22 10:27

OK now we're getting somewhere... yes, your installation has the entry for 'test' mode. Can you send me file checkoutgoogle/templates/Admin.tpl please?

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Wed, 2008-10-22 18:34

OK. Here it is. I've just changed the filename to Admin.txt in order to attach it to this post.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-10-22 19:26

can you send me a screenshot of your checkoutgoogle admin page settings? (change the merchant key beforehand). I'm trying to understand how that setting can still be at 'test' when the admin page says 'live'.

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Wed, 2008-10-22 21:03

Screenshot attached

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-10-22 21:17

Um.... why does your screenshot say, under "Google Checkout Operating Mode" - "Test (No Real Transactions)" ??

 
edwardtn

Joined: 2008-09-27
Posts: 21
Posted: Wed, 2008-10-22 23:16

Wow...didn't see that one coming! I've been keeping up with the post, trying to see why the http auth data is not being sent. Please let me know if you need any other testing.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-10-23 05:21
Quote:
I've been keeping up with the post, trying to see why the http auth data is not being sent.

@Edwardtn - remind me, where did we get to with your installation - is it working now?

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Thu, 2008-10-23 06:29

Sorry, hadn't changed it from when we last did some debug output. I can amend the settings, double check that the module produces zero output in the debug and re-upload if you want, but I can assure you that it has been in Live mode previously.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-10-23 09:16
Quote:
Sorry, hadn't changed it from when we last did some debug output.

You're totally confusing me. Which debugging were you doing in 'test' mode? Are you saying that the debug output that you posted earlier was in test mode? When you ran your mysql query, what mode were you in then? Please repeat these tests and repost - especially the mysql query, which is vital, making sure that you've set it to 'live' mode. It's very difficult for me to get my brain around why your installation is, or appears to be, functioning differently to everyone else's, when I'm not 100% sure what it is you're showing me!

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Thu, 2008-10-23 09:51

Well, I can only imagine that it must have been in Test mode as I have not been able to replicate it.

So we're now at the point where it is transmitting the Merchant ID and Key. Great.

Presumably though, it should now pass me through to the Google Checkout to complete the transaction? Instead I'm getting

Quote:
Apologies. There was a problem preventing you from transferring to the Google Checkout service. Please try again, or choose another method of payment.

This is definitely in Live mode by the way ;o)

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-10-23 10:44

...moving on....

Quote:
Instead I'm getting...

That message should be accompanied by an administrative notification email from your website, containing the response from Google. If you can post the contents, that would be helpful.

(In other words, we're back to here: http://gallery.menalto.com/node/82070#comment-289086)

 
edwardtn

Joined: 2008-09-27
Posts: 21
Posted: Thu, 2008-10-23 12:06

I am going to try to catch up with these tests myself tonight. The last error I received was failing basic http authentication from Google.

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Thu, 2008-10-23 20:44

OK, in Live mode I get this email response:

Quote:
Administrative Notification:

GoogleCheckout: there was a problem preparing an order when a user tried to use Google Checkout.

We contacted Google at this url:
https://checkout.google.com/api/checkout/v2/merchantCheckout/Merchant/948520039291364

The Google Website returned the following response:

You can check the status of this order any time at this location:
http://www.mysite.co.uk/view-gallery?g2_view=checkout.OrderStatus&g2_transactionId=3606&g2_verify1=1222974665&g2_verify2=3377082664900da54819cc5.49875591

and in Test Mode I get this email response:

Quote:
Administrative Notification:

GoogleCheckout: there was a problem preparing an order when a user tried to use Google Checkout.

We contacted Google at this url:
https://sandbox.google.com/checkout/api/checkout/v2/merchantCheckout/Merchant/123123123123123

The Google Website returned the following response:

You can check the status of this order any time at this location:
http://www.mysite.co.uk/view-gallery?g2_view=checkout.OrderStatus&g2_transactionId=3662&g2_verify1=1224793049&g2_verify2=7117528314900dbd96229e5.73070735

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2008-10-24 00:22

The fact that there's no response from Google is suspicious. I wonder if your host allows outgoing connections on port 443? I'll have to think of a way to test that. Maybe you could file a support ticket to verify the answer?

 
edwardtn

Joined: 2008-09-27
Posts: 21
Posted: Fri, 2008-10-24 00:43

My emails looked exactly the same, but logging into Google, or clicking the google URL in the email showed the HTTP Authentication message...

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Fri, 2008-10-24 06:16

Yep, me too. I'm wondering if the Google Checkout --> Settings --> Integration need to be amended. I've tried changing the settings without any success.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2008-10-24 08:00

The google settings are documented in the module's codex page:

http://codex.gallery2.org/Gallery_2:Modules:checkoutgoogle

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Fri, 2008-10-24 22:51

Nope. I started out with all the settings set as in the codex. I've also tried different variations of Google Checkout settings to see if that helps but nothing.

The only thing I have not done before now is add the Rewrite Rule described in the codex. I added this to the top of my Gallery .htaccess file but still no joy.

I will ask my host if they allow outgoing connections on port 443.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-10-25 04:32

add this at line 190 of CheckoutGoogleResponseHelper.class for some extra debugging info (the return code):
echo "<pre>Status code from remote call to Google was $returnStatus</pre><br>";
Let me know what it says, when you try the Google checkout button.

I'll modify the code to make that information part of the admin email as well, I think.

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Sat, 2008-10-25 06:26

OK. In Test mode I get this response

Quote:
Merchant Id is: 123123123123123, MerchantKey is tH1SteSts-ThEPlUg1n8OrK, and authorizationKey is MTIzMTIzMTIzMTIzMTIzOnRIMVN0ZVN0cy1UaEVQbFVnMW44T3JL
About to execute requestWebPage with the following header data:
Array
(
[Authorization] => Basic MTIzMTIzMTIzMTIzMTIzOnRIMVN0ZVN0cy1UaEVQbFVnMW44T3JL
[Content-Length] => 1439
)

Status code from remote call to Google was

and an email which says

Quote:
Administrative Notification:

GoogleCheckout: there was a problem preparing an order when a user tried to use Google Checkout.

We contacted Google at this url:
https://sandbox.google.com/checkout/api/checkout/v2/merchantCheckout/Merchant/123123123123123

The Google Website returned the following response:

You can check the status of this order any time at this location:
http://www.cacchioli.co.uk/view-gallery?g2_view=checkout.OrderStatus&g2_transactionId=3676&g2_verify1=1224915667&g2_verify2=7158448944902bad3c07545.03139248

In Live mode I get the same (just with the real Merchant ID & Key and the Google URL is the Checkout one and not the sandbox URL)

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-10-25 18:11

At present, I'd have to guess that your website is being blocked from opening a connection to the Google service. Maybe you could check with your hosting provider whether they have any blocks on outbound connections?

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Sun, 2008-10-26 13:03

I've emailed my host about this and should have an answer tomorrow. They're usually pretty quick at responding with an answer.

 
winkypicker
winkypicker's picture

Joined: 2003-01-21
Posts: 117
Posted: Wed, 2008-10-29 21:18

Right, I've got an answer. It took longer than normal but nonetheless I have an answer!

They have told me that they have no blocks on port 443 or any other port that might affect the connection to the Google Checkout and that they currently have other clients successfully using other Google Checkout integrations.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-10-29 21:35

Guess I'm stumped then. That part of the code works out-of-the-box on all four installations I've tested it on - three different web hosts and my local testing server. I think I've done just about all I can, sorry!

 
elfnmajic

Joined: 2009-01-29
Posts: 3
Posted: Thu, 2009-01-29 21:20

Well after about 3 hours with customer I too was stumped until you gave me a lead alecmyers.

It is indeed an issue with port 443 outbound communication. My customer using IIS 6.0 and PHP 5 experienced the same issue as indicated in this thread.

We solved the issue with 443 output by enabling the extension=php_openssl.dll, tell your Hosting provider to enable this module.

Thanks
John