Google Checkout issue

petie

Joined: 2008-09-28
Posts: 9
Posted: Sun, 2009-04-19 00:20

I am trying to get the Google Checkout module to work and I am running into some trouble and hope I can get some help. I feel I am so close, but can not get the one last piece to go...

System info is:

Gallery URL = http://artkival.com/gallery/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 cgi-fcgi
Webserver = Apache/2.2.8 (Unix) FrontPage/5.0.2.2635
Database = mysql 5.0.75, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, LinkItemToolkit, Thumbnail, Gd, SquareThumb
Acceleration = full/900, full/900
Operating system = Linux vux13 2.6.22.10-NETSOL #1 SMP Tue May 20 17:56:43 EDT 2008 i686
Default theme = carbon
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
Rows in GalleryAccessMap table = 53
Rows in GalleryAccessSubscriberMap table = 1168
Rows in GalleryUser table = 5
Rows in GalleryItem table = 1165
Rows in GalleryAlbumItem table = 53
Rows in GalleryCacheMap table = 840

The following Commerce plugins are installed, configured and active:

Checkout 0.4.3
Checkout by Email 0.4.0
Checkout by Google 0.4.0
eCard 1.0.4

All other Commerce plugins are not active.
URL Rewrite 1.1.18 is installed, active (both tests pass) and the Checkout by Google rule is enabled.

The Google checkout plugin fails on the Url test with the message "The test failed. You cannot receive Google Checkout notifications at this url." But here is where it gets interesting: after the message the entire home page for my site, just in text, follows, complete with all links being active.

Any help will be greatly appreciated.

Thanks,

Peter

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Sun, 2009-04-19 23:19

will try to look at this tomorrow

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Mon, 2009-04-20 20:30

Hi Petie,

What are you putting in the url box when you press the button?

 
petie

Joined: 2008-09-28
Posts: 9
Posted: Mon, 2009-04-20 21:06

Hi Alec,

Should have included this - https://artkival.com/gallery/main.php. Have also tried http://artkival.com/gallery/main.php, per info in other posts- same results. The page that shows up in the results of the test is http://artkival.com/home.html.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Mon, 2009-04-20 21:35

can you please (temporarily) put the following as your checkout account identifier and merchant key in the module admin page:

1234567890

testkey

And drop a reply in this thread when you're done.

EDIT: actually don't bother replying, instead visit this url while you're logged in as admin, and post the full error response including stack trace:
https://artkival.com/gallery/main.php?g2_view=checkoutgoogle.Response&g2_authorization=basic%20MTIzNDU2Nzg5MDp0ZXN0a2V5

 
petie

Joined: 2008-09-28
Posts: 9
Posted: Mon, 2009-04-20 22:09

URL produced the following:

The test failed. You cannot receive Google Checkout notifications at this url.

Security Violation

The action you attempted is not permitted.

Back to the Gallery

How do I find the stack trace?

 
petie

Joined: 2008-09-28
Posts: 9
Posted: Mon, 2009-04-20 22:13

Second try:

Security Violation

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_PERMISSION_DENIED)

* in modules/checkoutgoogle/Response.inc at line 53 (GalleryCoreApi::error)
* in main.php at line 450 (ResponseView::renderImmediate)
* in main.php at line 104
* in main.php at line 88

System Information
Gallery version 2.3
PHP version 5.2.6 cgi-fcgi
Webserver Apache/2.2.8 (Unix) FrontPage/5.0.2.2635
Database mysql 5.0.75
Toolkits SquareThumb, ImageMagick, Thumbnail, Gd
Operating system Linux vux19 2.6.22.10-NETSOL #1 SMP Tue May 20 17:56:43 EDT 2008 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Mon, 2009-04-20 22:19

{quote]* in modules/checkoutgoogle/Response.inc at line 53 (GalleryCoreApi::error)
* in main.php at line 450 (ResponseView::renderImmediate)
* in main.php at line 104
* in main.php at line 88

That's the stack trace - thanks.

OK - let's pass on that for the moment.

When you have the url in the "test notification" have you made sure to save the page contents *before* using the test button?

Assuming so, you need to find your server access logs. Put "https://artkival.com/gallery/main.php" in the test url box, hit Save Settings, then hit the "Test" button. If you get the contents of your main page in the middleof the screen you need to dig into the end of your server access logs for an entry with the *source* IP address equal to that of your server (the server querying itself), and the https url: post that line please.

 
petie

Joined: 2008-09-28
Posts: 9
Posted: Mon, 2009-04-20 22:52

Yes, I have saved the page contents before using the test button - saw that in a previous post.

From the server access log:

Second try, think this may be the relevant info:

205.178.182.175 - - [20/Apr/2009:18:47:57 -0400] "POST /gallery/main.php?g2_view=checkoutgoogle.Response HTTP/1.0" 302 335 "-" "-"
205.178.182.175 - - [20/Apr/2009:18:47:57 -0400] "POST / HTTP/1.0" 200 6832 "-" "-"

First try:

205.178.182.175 - - [20/Apr/2009:18:37:55 -0400] "POST /gallery/main.php HTTP/1.1" 302 - "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:56 -0400] "GET /gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin HTTP/1.1" 200 23861 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:57 -0400] "GET /gallery/main.php?g2_view=core.ItemDeleteJs&g2_lang=en_US HTTP/1.1" 200 1079 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/ArtkivalWeblogo-01.png HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/HomeLinkA.png HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/BioLink.png HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/ShowScheduleLink.png HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/ArtworkImagesLink.png HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/ComixxCondoze.jpg HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/MedicineLake.jpg HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/MoreInfo.png HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"
205.178.182.175 - - [20/Apr/2009:18:37:58 -0400] "GET /gallery/MartianRainfall.jpg HTTP/1.1" 404 693 "https://artkival.com/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=checkoutgoogle.Admin" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Mon, 2009-04-20 23:13
Quote:
205.178.182.175 - - [20/Apr/2009:18:47:57 -0400] "POST /gallery/main.php?g2_view=checkoutgoogle.Response HTTP/1.0" 302 335 "-" "-"

That looks like the one although I'm confused as to why this query - which should be coming from the webserver itself - appears to be sourced from the same machine as the other queries from your browser. According to my research your webserver is hosted at 205.178.147.129. Are you running your Gallery installation on your desktop machine which has a second IP address, or some other unusual network architecture?

I'm also not sure why your webserver has responded to that request with a 302 (Found) instead of a 200 (OK). Maybe the answer to one is tied up with the answer to the other. The second POST to the url / is the one that's returning the main page, so finding the reason for the 302 seems to be key.

EDIT: A quick test reveals that the two expected response codes are 200 for OK and 404 if there's an error, which is consistent with what you might expect.

Can you double check (redo the experiment) and look for a request from 205.178.147.129 in case this is a blind alley?

 
petie

Joined: 2008-09-28
Posts: 9
Posted: Mon, 2009-04-20 23:42

Gallery installation is running on Network Solutions hosted website. Single IP address for desktop.

Checked the access log. All entries are from either 205.178.182.174 or 205.178.182.175.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Tue, 2009-04-21 07:06

OK.

Leave the google merchant ID set to "1234567890", the key to "testkey", and turn on urlrewrite module including the rules for the googlecheckout and showitem, please.

 
petie

Joined: 2008-09-28
Posts: 9
Posted: Tue, 2009-04-21 15:54

Set id and key as above, saved settings. Set url rules as above and saved. Tested notification Url - same result "The test failed. You cannot receive Google Checkout notifications at this url." followed by home page.

2nd test: unchecked "Override URL in URL Rewrite rule?", saved and tested. Same result as above.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Tue, 2009-04-21 16:18

Nooooo.... leave it checked. I have some more tests to do, please confirm when that's done.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Tue, 2009-04-21 16:40

I'm not going to fuss about why the test button doesn't work, but you can receive google notifications fine at this (this is what to paste into the Google account configuration page) url.

https://artkival.com/gallery/main.php?g2_view=checkoutgoogle.Response

Don't forget to reset the Account and Key to the ones provided by Google. Good luck, and I hope you sell loads of pictures.

 
petie

Joined: 2008-09-28
Posts: 9
Posted: Tue, 2009-04-28 02:27

Alec:

Thanks so much. Ran a test purchase through and everything worked as expected. I really appreciate all of your assistance.