Setting
up an account with Google Checkout.
 |
 |
For a limited time, when you sign up for Google Checkout through Ecommerce
Templates, you will receive a $50 AdWords coupon....more
|
|
|
 |
 |
Release 5.2.0 saw support for the new payment
service Google
Checkout in the Ecommerce Plus templates PHP Version.
Please note, Google requires you to have an SSL
certificate for the API callback URL. We have some help here for
setting up on a secure server.
You will need to set the path to the SSL in your vsadmin/includes.php
file
To integrate your Ecommerce Plus template with Google
Checkout all you need to do is the following.
Firstly, go to the following URL and sign in to your Google account.
https://checkout.google.com/sell
The first thing you need to set there is your API callback
URL. To do that click on the Settings tab and then in the menu
on the
left click "integration".
Where it says...
API callback URL
...enter the following URL...
https://www.yourdomain.com/vsadmin/gcallback.php
...changing of course yourdomain.com for whatever your domain is.
Check the box labeled Callback Method XML
Check the box for Shopping cart post security
On that same page you should see your merchant id and merchant
key.
You need to enter those values for Google Checkout in the Ecommerce
Plus payment provider admin page.

If you put Google Checkout into demo mode on the admin payment
providers page it will use the Google Sandbox. You can set up a
Sandbox account to test your integration here...
https://sandbox.google.com/checkout/ -
You will need to create two test accounts in the Sandbox. One of
these accounts functions as a customer account and the other as
your merchant account. Google Checkout does not allow a single
account to function as both the customer and the merchant for the
same transaction...more
information
Please note that our digital
download plug-in is currently incompatible with Google Checkout.
U.K. merchants cannot yet use coupons or gift certificates and
we are awaiting Google to implement this as they have for US
merchants.
Important Note: The Google Checkout
system requires that a callback be sent to your site on an HTTPS
connection using Basic Authentication. Some server configurations
can interfere with this so if in doubt please ask your host.
Sometimes when PHP is running in CGI mode it can
cause problems with the Basic Authentication information. If this
is the case then you can try creating a file called ".htaccess" with
this in it...
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
...and upload that to your site.
We have created a script to test that the Basic
Authentication sent by Google can get through on your server here.
All you need to do is unzip it, upload it to your server and open
in your browser. If the script indicates possible problems please
contact our support here.
Default Shipping Value
When a purchase is made through Google Checkout
the Google server sends a callback to query shipping and tax settings.
If for
some reason Google can’t complete this callback they will
use whatever is set as the default shipping value. By default
this is set to $999 but you can override this by setting the
parameter googledefaultshipping in your vsadmin/includes.php
file. For example
$googledefaultshipping=25.0;
Please note, don’t set this value until you are sure your
integration is setup properly and your callbacks are working.
If you always receive a $999 value for shipping then firstly make
sure you have the latest updater installed and if that doesn’t
correct the situation, post a support request on our forum. Google Checkout and online shipping rate
calculations
When using online shipping rates calculators
such as UPS, USPS, FedEx and Canada Post we are obliged to query
the shipping rates server for every address your customer has
in their Google Checkout profile. This can lead to the Google
Checkout callback going over the 3 second limit imposed by Google
in some rare cases where the customer has more than 2 or 3 addresses
defined. If this is an issue for you, you would be recommended
to use weight based shipping or set the googledefaultshipping
value to an acceptable default shipping rate.
More troubleshooting
You can check any callback errors by logging on
to your Google Checkout account, and going to Tools > Integration
Console.
If you see the following: We encountered an error trying to access your server
at https://www.yoursite.com/vsadmin/gcallback.php -- the
error we got is: Sending failed with HTTP response code: 401. Response
body was: <html><head><title>401 Unauthorized</title></head><body>I'm
sorry, you are not authorized to view this page.<br></body></html>
You should get on to your server administrator
to find out why the Basic Authentication security information is
not
being
passed through, or switch to a Google Checkout friendly host
like
Servelink but
if neither of these is possible then get the very latest updater
here and apply that.
Then make a copy of your vsadmin/gcallback.php
script and give it a name of your choice, but still within the
vsadmin directory. For instance...
vsadmin/gc933akwe.php (Don't use our example!!)
Now set the following in your vsadmin/includes.php file...
$googlecallbackscript="vsadmin/gc933akwe.php";
This will have the effect of disabling your original vsadmin/gcallback.php
script and removing the check for the basic authentication on your
secret copy. It's not a first choice solution so just do this if
you can't get the Basic Authentication through any other way.
Also, remember to change the location of your
callback script in your Google Checkout Integration area.
If you receive the following error
the error we got is: org.apache.commons.httpclient.NoHttpResponseException:
... it probably means your server is running 5.0.x
of PHP. As this is a very old version, the best thing to do is
to ask your host if they can update as there will have been many
bug and security releases made available since.
Tweaking
the button display
The buy button itself comes from Google so it is not possible
to modify that other than in the ways outlined below with this
addition to includes.php
$googlebuttonparams="&w=160&h=43&style=white&variant=text&loc=en_US";
You can change the style from white to trans for those using
the button on a colored background. You can set the button size
by changing the w and h params and this can be one of...
large: 180 by 46
medium: 168 by 44
small: 160 by 43
AVS
/ CVV checking
When orders start coming though you will see the AVS and CVV codes
like this in your orders admin page

This is what the codes refer to, and shipping decisions should
be taken accordingly
- AVS
- Y - Full AVS match (address and postal code)
- P - Partial AVS match (postal code only)
- A - Partial AVS match (address only)
- N - no AVS match
- U - AVS not supported by issuer
- Yes - eligible for buyer protection
- No - not eligible for buyer protection
- CVV
- M - CVN match
- N - No CVN match
- U - CVS not available
- E - CVN error
- 134 - the age in days of the buyer's account.
Changing
order status
The Charge, Cancel, Refund, Ship buttons associated with a Google
Checkout order on the Ecommerce Template order details page will
actually change the order status not only on your ECT admin page
but on the Google Checkout system also.

This will keep orders in sync between the two systems. Clicking
the button won't immediately update the ECT status. It will update
the Google Checkout system and Google Checkout will send a message
back updating the ECT status thus ensuring the 2 systems are in
sync.
You can change the delivered status that Google will set for a
delivered order by setting the switch in vsadmin/includes.php...
$googledeliveredstate=5;
...to whatever you like.
Google Analytics
To set up Google Analytics through integration
into the checkout what you need to do is set the following
in your vsadmin/includes.php file...
$googlecheckoutanalytics=TRUE;
On every one of your site pages
you would then set the following to enable Google Analytics
support. You must modify the value
of the _uacct variable in the tracking code to specify your Google
Analytics account number in place of the value "UA-XXXXX-X".
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-XXXXX-X";
urchinTracker();
</script>
In your cart.php page however you would also
add this below the above script...
<script src="http://checkout.google.com/files/digital/urchin_post.js"
type="text/javascript">
</script>
Please do read our guide here on credit
card fraud.
For more information, rates and support, please visit the Google
website.
|