Have checkout, and the paypal module working. I have the SSL setup for the return back from Google, but it does not seem to get that far. This error is displayed upon pressing the Google Checkout button. Any help is greatly appreciated!
The action you attempted is not permitted.
Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER) : C:\Sites\Single3\photosbyjojo\webroot\gallery\modules/checkout/ConfirmPhotos.inc
* in C:\Sites\Single3\photosbyjojo\webroot\gallery\modules\core\classes\GalleryView.class at line 182 (GalleryCoreApi::error)
* in C:\Sites\Single3\photosbyjojo\webroot\gallery\main.php at line 324 (GalleryView::loadView)
* in C:\Sites\Single3\photosbyjojo\webroot\gallery\main.php at line 103
* in C:\Sites\Single3\photosbyjojo\webroot\gallery\main.php at line 88
System Information
Gallery version 2.3-RC1
PHP version 5.2.5 cgi-fcgi
Webserver Microsoft-IIS/6.0
Database mysqli 5.0.51b-community-nt-log
Toolkits Thumbnail, Gd
Operating system Windows NT SINGLE3 5.2 build 3790
Browser Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Posts: 4342
You're using an old version of checkout. Please update your installation to checkout 0.4.0.
Posts: 21
The version displayed on my plugins page is 0.4.0. I had thought that something may be awry with this. The /modules/checkout/ folder does not contain ConfirmPhotos.inc. (only Confirm.inc). Is there a way to get the checkout module and install the include files and templates manually?
Posts: 4342
LOL! it's actually a typo in checkoutgoogle, my bad, sorry.
I'll get the revised code into the repository later today, I hope.
Thanks for pointing out the problem.
Posts: 21
Appreciate it. I do not know enough PHP to fix it myself.
Posts: 4342
A fix is uploaded - it should be downloadable from the 'get more plugins' page in three hours. Look for code revision 1643.
You're not out of the woods yet though - you only get the effect of that bug if the google website returns an error, so I shall wait with interest to find out what happens next!
Posts: 21
It appears you were correct. I now get this message displayed on the Gallery checkout page:
Apologies. There was a problem preventing you from transferring to the Google Checkout service. Please try again, or choose another method of payment.
Must be a problem either with Google or with the transmitted data. I configured the Google settings exactly like the link you posted.
Do you have any idea where I can start looking for the problem?
Posts: 4342
Edward,
if you have checkout administrative notifications enabled you should get an email saying "GoogleCheckout: there was a problem preparing an order when a user tried to use Google Checkout." and going on to list the response from the Google website, which will help identify the error.
Posts: 21
Awesome, I will check this tonight, thanks for all the great help.
Posts: 21
Alec,
This is what I receive back from google...
You must use HTTP Basic Authentication for API calls (username=Seller ID, password=Merchant Key)
Not sure what this means, I would think this would be transmitted with the initial transmission.
Posts: 4342
Hmmm... interesting, as the basic authentication is indeed automatically coded into the transmission from checkout to Google.
Have you entered your checkout merchantId and Key correctly in the checkoutgoogle config page?
Posts: 21
Yes, I have double-checked that already. I was thinking along the same lines so My next step will be to contact google support and see why authentication could be failing.
Posts: 4342
I would suggest adding a print_r statement in the following file: modules/checkoutgoogle/classes/CheckoutGoogleResponseHelper.inc at line 187 so it reads as follows:
If you post what you see here, obfuscate the authentication data as it reveals your merchantId and Key.
Posts: 21
This was the result of adding the print_r statement above:
Array
(
[Authorization] => Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
[Content-Length] => 1522
)
It appears to not contain my merchant id and key...strange, this information is readily visible on the Google Checkout Configuration screen.
Posts: 4342
It does, just base64 encoded. I've changed your post to minimise the security risk of you posting the data.
So it's curious as to why google isn't recognising the authorisation data in the header. I'll have to think about it, and get back to you, probably in a couple of days time.
Posts: 117
Hi,
I'm having the exact same problem with my installation.
Any help or update on this situation would be greatly appreciated.
Thanks.
Gallery version = 2.3-rc-2 core 1.2.37
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.4 apache2handler
Webserver = Apache/2.0.61 (Unix) mod_ssl/2.0.61 OpenSSL/0.9.8b FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1 PHP/5.2.4
Database = mysqlt 4.1.22-standard, lock.system=flock
Toolkits = NetPBM, Gd, jpegtran, Ffmpeg, ImageMagick, Dcraw, SquareThumb
Operating system = Linux ns1.myhosting.com 2.6.18-92.1.13.el5 #1 SMP Thu Sep 4 03:51:01 EDT 2008 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Posts: 21
I have an email into Google support to make sure everything is correct on that end. My google settings are exactly like they are supposed to be. I am glad someone else has the same problem (though not wishing problems on anyone!). Good to see someone with Apach has the same problem, so I know it's not an IIS problem.
Posts: 4342
I'll look into it further. Bear in mind that checkoutgoogle is only being used by about 4 people on the planet, at the moment, with you at numbers 3 and 4. (I got no response when I asked for volunteers to help test it, so I uploaded the code as-is, for people to try out.) It uses various parts of the Gallery installation that other checkout modules don't, particularly regarding encryption, authentication, ssl access etc, so I'm not surprised it's not a straightforward install at this stage. Please be patient while we learn where the problems are on different installations.
Posts: 21
I have no problem working through the problems. I'm new to Gallery, but have a separate installation for testing. My production installation is working great with checkout and checkoutpaypal, just looking to ggogle to give customer's another option. Whatever you want to test just let me know, I'm in. Thanks for all your help so far.
Posts: 21
Alec, have you had any time to look at this issue?
Posts: 4342
no not yet, sorry. Been too busy actually taking photographs!
Posts: 21
No problem, I am actually doing well with paypal orders right now as well...but would like to revisit Google Checkout in the future. The whole checkout module has been awesome, no more wasting gas for proofing and ordering!!!
Posts: 4342
Can you try the test button on the checkoutgoogle config page, and report results please? Does the test pass or fail??
Posts: 117
When I try the test button I get
It doesn't help that my host has not yet updated the certificate and it has expired, but even prior to this it was giving the same error message.
Posts: 4342
Um, did you not consider this worth mentioning in your initial post....?
To be honest, there's not any point continuing until your site has a valid certificate.
Edwardtn: please report your test-button results.
Posts: 21
Hmmm, my test is failing now as well. But it was working (the test button at least), prior to the last build you released I believe. I do not think the callback url is anywhere my problem yet...I am not getting near that far. The initial post to Google is failing Basic HTTP Auth.
Posts: 117
Perhaps I should have mentioned this, however, the PayPal plugin has a similar field which can be left empty. In my mind it is not 100% clear that this is a required field in order to make the plugin work.
Posts: 21
It is required for Level 2 Integration...which is receiving Order Payment, Shipping, and Completion notices from Google. Theoretically, with just Level 1 Integration you could verify the order completion in the Google Interface and update your order status in Gallery Site Admin. But I very much would like to have Level 2 Integration working.
Posts: 117
Which is kind of what I thought, but I am not getting either flavour of this.
Posts: 4342
@edwardtn & winkypicker: the test button also tests the http authentication data. If you put your regular gallery url up to and including the main.php part in the box (not HTTPS, just HTTP) then you should be able to get a positive test result, if your website is correctly encoding and decoding your merchant id and key as the authorisation data. Please try this and report the results.
Incidentally, if you don't have http:// access you can "lose" orders in the system - Google can't contact your site to confirm the order, and if the customer doesn't return to your website after payment then the transaction will never ever show up in the orders table for you to be able to update its status. I strongly recommend you *don't* use checkoutgoogle unless and until you can arrange HTTPS access. I'll update the module documentation to make that clear, tomorrow.
Posts: 21
Okay, I just received this error:
OKPHP Notice: Undefined index: google-order-number in C:\Sites\Single3\photosbyjojo\webroot\gallery\modules\checkoutgoogle\Response.inc on line 60
Posts: 117
Alec,
I tried what you said and I got
(The URL I input disappears after I hit the test button)
As stated above I then copy and paste the URL into Google Checkout Settings but get
Which was expected. Then I thought well this is only needed for Level 2 integration as previously discussed and I try and make a purchase. I click the Google Checkout button and I get:
Posts: 4342
@edwardtn:
Thanks - that's flagged up a minor issue, which I've fixed, but nothing that's affecting your site. Essentially the test was OK, so your web server appears to be correctly formulating and interpreting the http authorization data. So I'm still not clear why Google isn't accepting it.
@winkypicker:
(The url you use to test stays in the box if you save the page.) If you see that message about a problem transferring you to Google you should also get an email reporting the results from the Google site.
Posts: 117
Alec,
Yes, I get the problem transferring you to Google message along with an email which says:
Plus a link which gives this result:
Posts: 117
Oh, and the test URL does stay so long as you hit Save before you hit Test. You're right!
Posts: 4342
@winkypicker: can you please insert a line into your modules/core/classes/helpers/Webhelper_simple.class file at 248 so that it reads like this:
And report the result when you click on the pay-by-google link. Actually, better send the results to me by private message, as it should contain your merchant/key data (feel free to change a few digits if you like).
Posts: 117
OK, I inserted the line of code, deleted the template cache and I get the same result as before. I imagine you are trying to get some debug info printed to screen with this line of code. Sorry but no cigar.
Posts: 4342
Ok, change it to this:
BTW you don't need to bother deleting the template cache.
Edit.. Aargh.. my mistake: headerLines should have a capital L in it.
Posts: 117
Still no debug output.
Posts: 4342
Interesting...
OK, load up modules/checkoutgoogle/classes/CheckoutGoogleResponseHelper.class and add this at line 188:
And try again!
Posts: 117
OK, this is what I get
Posts: 4342
Exactly that? That is, you didn't redact any characters in the [Authorization] field? OK, that's definitely incorrect, so I suspect we're getting somewhere.
Please add this line at 167 to the same file
echo "<pre>Merchant Id is: $gcMerchantId, MerchantKey is $gcMerchantKey, and authorizationKey is $authorizationKey</pre>";
so it readsand report back.
If you get sensible output, please change some of the characters of each field to either random digits, or x's, but please leave the field lengths the same.
Posts: 117
OK. This time I get this:
Posts: 4342
Are you in live or test mode? Can you just 100% confirm for me that in the Admin page you've filled in the Merchant Id and Merchant Key boxes that match the mode you're trying to work in (test or live)?
Posts: 117
I'm in Live mode and the Merchant ID and Merchant Key are definitely filled in and these are the correct set for live transactions.
Posts: 4342
It's very peculiar - it looks like that piece of code isn't reading your Id and Key from the db, although why that might be I have no idea. Can you post as an attachment that entire modules/checkoutgoogle/classes/CheckoutGoogleResponseHelper.class file so I can have a look at it please?
Thanks
Posts: 117
I PM'd you with the file.
Posts: 4342
can you put some random characters into the test-mode Merchant Id and Key fields, and save them - then retry, and see what the debugging lines we added to the class file produce on screen?
Posts: 117
OK, this is what I get when I put random Merchant ID and Key fields in - I have retained the same field length as a real transaction
Posts: 4342
Ok... now it looks like we're getting somewhere. Apparently your installation thinks it's in test mode, even when you've set it otherwise.
Do you have access to phpMyAdmin to have a look in your database? If so, can you run this query (with table names adjusted, should you need to):
and let me know what the result is?
Posts: 117
OK. This is the result of the query
I'm a complete novice with phpMyAdmin so I hope this is what you are looking for, but my reckoning is that what you said is confirmed and that my install thinks I am in test mode!?!