Jump to content
Sign in to follow this  
ski2bbad

GOOGLE CHECKOUT IPN

Recommended Posts

For some reason when a customer makes a purchase using google checkout IPN, the IP Address is not recorded in the database, although when placing an order, the website displays the ip address.

 

Anyone know of to fix this issue?

 

this is a big security risk for me, because i always check the IPs of customers for fraud possibilities before i process the order.

Share this post


Link to post
Share on other sites
For some reason when a customer makes a purchase using google checkout IPN, the IP Address is not recorded in the database, although when placing an order, the website displays the ip address.

 

Anyone know of to fix this issue?

 

this is a big security risk for me, because i always check the IPs of customers for fraud possibilities before i process the order.

 

hi cherven,

not sure if you solved this but here is something that seems to work for me (so far)

1. http://addons.oscommerce.com/info/2138 Order IP Recorder (i used v1.5 by hakdogan which provides a clickable IP link in Admin Orders that takes you to showmyip.com and displays all kinds of info relevant to the IP and ISP)

1a. Take care when adding ipaddy and ipisp to the $check_status_query in catalog/admin/orders.php

the first *ADD TO THE QUERY: shows ipaddy, ipisp BUT IT SHOULD BE: , ipaddy, ipisp (comma in front of ipaddy)

1b. in (2) catalog/admin/includes/classes/order.php the directions say to: * ADD 'ipaddy, ipisp' to the query (no quotes) so it goes between orders_status and last_modified (just a heads up)

2. in google_ipn.php at the top, right under:

require('includes/application_top.php');

require(DIR_WS_MODULES . 'payment/google/xml.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_GOOGLE_IPN);

require(DIR_WS_MODULES . 'payment/google/google_func.php');

there is an if (!google_notification_check()) {... statement which writes to the log file

i noticed the log file (gclog/google_log.txt) simply contained a timestamp, blank username and password and Notification Check Error!

even after i added htaccess and htaccesspwd files to the gclog folder in the hope that it would authenticate the google merchant id and key- no such luck

so noticing the last line of the if (!google_notification_check()) { ... contained the word- die();

I decided to put it out of its misery and commented it out:

// if (!google_notification_check()) {

// $fp = @fopen("gclog/google_log.txt","a");

// @fwrite($fp, date('Y-m-d H:m:s') . "------------------------\n");

// @fwrite($fp, "User Name: " . $_SERVER['PHP_AUTH_USER'] . "\nPassword: " . $_SERVER['PHP_AUTH_PW'] . "\n");

// @fwrite($fp, "Notification Check Error!\n\n");

// @fclose($fp);

// die();

// }

additionally, i commented out

// $xml_data = $HTTP_RAW_POST_DATA;

and replaced it with:

$xml_data = file_get_contents("php://input");

because i have register globals OFF and it is supposedly less labor intensive than $HTTP_RAW_POST_DATA

after those changes, i went through the checkout procedure with the google ipn and found that:

1. the log file contained xml sale info

2. the google_checkout_log database table contained 4 new rows per transaction versus 1 incomplete row prior to the changes

3. the orders database table now contained the google_order_id, ip and isp

4. the orders_status_history database table contained under comments "Google Change Status" where in prior tests it was blank

 

maybe this might work for you, i tried to be as detailed as possible and if someone recognizes a flaw in my "logic" please step forward!

oh yeah the standard warning stuff use at your own risk and backup your files first

hope this helps,

L8r,

jk

Share this post


Link to post
Share on other sites

The Google Checkout IPN goes to Google - and Google returns "Ooopss [company name] sent us a bad shopping cart . . . we'll contact them to let them know" error. It's not setup as a https site - though there is a an open SSL certificate now set up on the domain, but not in the Google Checkout software. Is this an easy fix now?

 

So do I have this set up wrong?

 

The old non IPN version of Google Checkout still works - without HTTPS.

 

Bob

Share this post


Link to post
Share on other sites

So I see that there is a warning this contrib violates certain TOS of Google Checkout... is there risk of using this contrib? Has anyone experienced any trouble or should I just go for it? I can't get the official module to work at all, it's very cumbersome and frustrating!!!

 

I don't want to get into trouble with Google of all people!!

Share this post


Link to post
Share on other sites

Please forgive me for posting it twice. Firt time I had it in the wrong area and could not get it moved.

 

After reading all 12 pages, I reallyd did not find a answer for my issue.I did revceive email from google of a new order. But when checking the admin side, it does display the customers name but with 0 orders.

 

Also when I enter this address in browser, all I see is this piece of text:

 

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

 

--------------------------------------------------------------------------------

 

Invalid at the top level of the document. Error processing resource 'https://brs-giftshop.com/gclog/google_log.txt'. Line ...

 

2008-08-02 08:08:45------------------------

 

The google checkout ipn version I am running is 1.2.1

 

Would appreciate any help on this if possible. Just installed this mod and first order using google.

 

thanks.

 

blr044

Share this post


Link to post
Share on other sites

Hi,

 

Got a problem with the Google Checkout IPN Module, PHP/XML novice so completely confused with this (have searched the forums and tried a few things, but no luck!)

 

When I make a payment from oscom to google checkout using the IPN module, I receive the following error from google:

 

<?xml version="1.0" encoding="UTF-8"?>

<error xmlns="http://checkout.google.com/schema/2" serial-number="d6134156-6c96-4d5a-a651-1ce56bb7fa50">

<error-message>Error parsing XML; message from parser is: cvc-complex-type.2.4.a: Invalid content was found starting with element 'shipping-taxed'. One of '{"http://checkout.google.com/schema/2":default-tax-rule}' is expected.</error-message>

</error>

 

the following XML was submitted by oscommerce:

 

<?xml version="1.0" encoding="UTF-8"?>

<checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">

<shopping-cart>

<items>

<item>

<item-name>19LS4D LCD Television + Kameleon URC 8308 Universal Remote Contr</item-name>

<item-description>19LS4D LCD Television + Kameleon URC 8308 Universal Remote Contr</item-description>

<unit-price currency="GBP">204.08</unit-price>

<quantity>1</quantity>

<tax-table-selector>tax-3170</tax-table-selector>

</item>

</items>

<merchant-private-data>

<osc-orders-id>25</osc-orders-id>

</merchant-private-data>

</shopping-cart>

<checkout-flow-support>

<merchant-checkout-flow-support>

<continue-shopping-url>http://www.afribuy.net/catalog/checkout_success.php?order_id=25</continue-shopping-url>

<tax-tables>

<default-tax-table>

<tax-rules>

<shipping-taxed>false</shipping-taxed>

<rate>0.9500</rate>

<tax-area>

<postal-area>

<country-code>GB</country-code>

</postal-area>

</tax-area>

</default-tax-rule>

</tax-rules>

</default-tax-table>

<alternate-tax-tables>

<alternate-tax-table name="tax-3170" standalone="false">

<alternate-tax-rules>

<alternate-tax-rule>

<rate>0.9500</rate>

<tax-area>

<postal-area>

<country-code>GB</country-code>

</postal-area>

</tax-area>

</alternate-tax-rule>

</alternate-tax-rules>

</alternate-tax-table>

</alternate-tax-tables>

</tax-tables>

<shipping-methods>

<flat-rate-shipping name="Air Freight (Flat rate of GBP 3.95 + GBP 3.10 per Kilo)">

<price currency="GBP">29.96</price>

<shipping-restrictions>

<allowed-areas>

<world-area/>

</allowed-areas>

</shipping-restrictions>

</flat-rate-shipping>

</shipping-methods>

</merchant-checkout-flow-support>

</checkout-flow-support>

</checkout-shopping-cart>

 

 

Would be very grateful if someone could give me some pointers on where the problem lies?

 

Thanks,

 

Karl

Share this post


Link to post
Share on other sites

I've used the 'other' Google Checkout for quite some time, but recently installed Google Checkout IPN in order for GC users to apply discount coupons (CCGV) to their orders.

 

The only thing I don't like about this setup is that there is no Edit Cart URL when you hit GC. I found this chunk of code in catalog>includes>modules>payment>google.php

 

$data .= '		<checkout-flow-support>' . $eol;
$data .= '			<merchant-checkout-flow-support>' . $eol;
$data .= '				<continue-shopping-url>' . htmlentities(tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'order_id=' . $orders_id)) . '</continue-shopping-url>' . $eol;

 

Then, I discovered a tag I could use called <edit-cart-url>...and I tried to implement it in the code above like this:

 

$data .= '		<checkout-flow-support>' . $eol;
$data .= '			<merchant-checkout-flow-support>' . $eol;
$data .= '				<edit-cart-url>' . htmlentities(tep_href_link(FILENAME_SHOPPING_CART, 'order_id=' . $orders_id)) . '</edit-cart-url>' . $eol;
$data .= '				<continue-shopping-url>' . htmlentities(tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'order_id=' . $orders_id)) . '</continue-shopping-url>' . $eol;

 

Well, it works in so much that it does place a link for Edit Cart on the customer's Google Checkout payment page. But, when clicked on...it takes me back to the cart, which is now empty. ???

 

Should I be formatting this differently? I really think an Edit Cart link should be there, because there is no other way for the customer to go back and change their order. If they hit the back button on their browser, they get a Page Expired message and it's over. Even if they hit F5 after seeing that, they go back to an empty shopping cart.

 

- Andrea

Share this post


Link to post
Share on other sites

Well, this thread appears to be dead/unsupported, but if anyone could help me with this query, i'd be extremely grateful:

 

I need to change the <continue-shopping-url> field in google.php, so instead of pointing at www.afribuy.net/checkout_success.php, it points to a wrapper URL e.g. "http://www.afribuy.net/main/index.php?option=com_wrapper&view=wrapper&Itemid=74"

 

I've spent some considerable time looking at this and its associated PHP files, but must confess having no knowledge of PHP and programming not being my thing, i'm stumped!

 

Anybody out there who can answer this?! i'm sooo close to being ready to launch...

 

Many Thanks

 

Karl

Share this post


Link to post
Share on other sites

Hello,

 

I hope i dont sound silly or anything but i am new to the whole php thing. first of all contrib is amazing.. I installed it successfully, but before i was using paypal ipn, and it sent out my custom email when a purchase was made, now when a purchase goes through on google checkout it does not send out my custom email.. Any help here would be apprieciated..Thanks

Share this post


Link to post
Share on other sites

hi just instaled it

 

it works fine

 

but getting some problem with STS (simple template system)

 

when its turned off, google checkout works fine, process to google

 

but when i turn option STS to true in admin, then on last stage when it supposed to take u to google pages i got some page witch things like :

 

$cartbox$

$maninfobox$

$orderhistorybox$

$bestsellersbox$

$reviewsbox$

$tellafriendbox$

$languagebox$

$currenciesbox$

 

 

$categorybox$

$manufacturerbox$

$whatsnewbox$

$specialbox$

$searchbox$

$informationbox$

 

 

Anyone know how to fix this ?

 

be much appreciate

 

 

thx

Share this post


Link to post
Share on other sites

I am using this contribution. I am also using Gift Wrap V1.0 (http://addons.oscommerce.com/info/8115)

 

The Gift wrap option works well and is calculated into the total of the order up until it is being process by Google Checkout.

 

In Google Checkout, the entire order is being charged EXCEPT for the gift wrap.

 

Is there a way to fix this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×