Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
g_hadgraft  
View profile  
 More options Jul 2 2009, 11:58 am
From: g_hadgraft <graham.hadgr...@gmail.com>
Date: Thu, 2 Jul 2009 08:58:48 -0700 (PDT)
Local: Thurs, Jul 2 2009 11:58 am
Subject: Google Checkout form
Hi,

Im working on interchange store which is just a e-commerce framework
for perl. Im having real trouble getting merchant callbacks to work
with in my store. I have sent google an order which successfully sends
a callback when ever the delivery is changed.

This callback returns back the following xml:

<?xml version="1.0" encoding="UTF-8"?>
<merchant-calculation-results xmlns="http://checkout.google.com/schema/
2">
<results>
<result shipping-name="Standard Delivery (3-5 Days)" address-
id="H-7538">
<shipping-rate currency="GBP">0</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
<result shipping-name="Next Working Day" address-id="H-7538">
<shipping-rate currency="GBP">3.45</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0.52</total-tax>
</result>
<result shipping-name="Standard Delivery (3-5 Days)" address-
id="3414912">
<shipping-rate currency="GBP">0</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
<result shipping-name="Next Working Day" address-id="3414912">
<shipping-rate currency="GBP">3.45</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0.52</total-tax>
</result>
</results>
</merchant-calculation-results>

The address ids have been truncated, This is being returned as type
XML, this is being handled by interchange, the following is the perl
that creates the xml:

        my $addresses = $callback->get_addresses;

        my $return .= qq|<?xml version="1.0" encoding="UTF-8"?>\n<merchant-
calculation-results xmlns="http://checkout.google.com/schema/2">
\n<results>\n|;

        for my $address (@$addresses)
        {

                $ret = <<__ADDRESS__;
        Address:      $address->{id}
        Country code: $address->{country_code}
        City:         $address->{city}
        Postal code:  $address->{postal_code}
        Region:       $address->{region}

__ADDRESS__

        $return .= qq|<result shipping-name="Standard Delivery (3-5 Days)"
address-id="$address->{id}">\n<shipping-rate currency="GBP">0</
shipping-rate>\n<shippable>true</shippable>\n<total-tax
currency="GBP">0</total-tax>\n</result>\n<result shipping-name="Next
Working Day" address-id="$address->{id}">\n<shipping-rate
currency="GBP">3.45</shipping-rate>\n<shippable>true</shippable>
\n<total-tax currency="GBP">0.52</total-tax>\n</result>\n|;

        }

        $return .= qq|</results>\n</merchant-calculation-results>|;

This is then printed as output by interchange.

The result is a page that can  be viewed as xml in the browser, minus
the information retrieved by the result.  A log however show that the
xml being returned to google actually contains the information sent by
google.  I am presuming i am overlooking some detail as all attempts i
seem to make fail.  I would appreciate it if anyone is able to help.

Graham Hadgraft


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jerry Krinock  
View profile  
 More options Jul 2 2009, 12:42 pm
From: Jerry Krinock <je...@sheepsystems.com>
Date: Thu, 2 Jul 2009 09:42:08 -0700
Local: Thurs, Jul 2 2009 12:42 pm
Subject: Re: [google-checkout-api-perl] Google Checkout form

On 2009 Jul 02, at 08:58, g_hadgraft wrote:

Hello, Graham.  I read your message twice but still don't understand  
what the problem is.  I believe you should clarify, first of all, what  
type of problem it is.  There are, I would say, three such types:

Type 1.  The API seems to be not behaving as documented.  (GCO should  
fix bug.)
Type 2.  I don't know how to use the API.  (Developer needs to fix  
code.)
Type 3.  Not sure if Type 1, Type 2 or both.  This really shouldn't  
happen very much here since you can easily log what you're getting  
from GCO.

The following:

> A log however show that the xml being returned to google actually  
> contains the information sent by google.

seems to indicate that this problem is Type 2, that you need help with  
your perl code, since it is your code which returns xml to GCO.  Is  
that true?

Maybe it's just me, but I believe you should try and state the problem  
more succinctly.

Sincerely,

Jerry Krinock


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
graham hadgraft  
View profile  
 More options Jul 3 2009, 7:33 am
From: graham hadgraft <graham.hadgr...@gmail.com>
Date: Fri, 3 Jul 2009 12:33:48 +0100
Local: Fri, Jul 3 2009 7:33 am
Subject: Re: [google-checkout-api-perl] Re: Google Checkout form

Ok ill try to be clearer in this post.  My problem is number 2,  What i am
doing is in perl, i am creating the following xml precdurally with perl,
this is the actual output of the script as i have logged it when it is
created.
<?xml version="1.0" encoding="UTF-8"?>
<merchant-calculation-results xmlns="http://checkout.google.com/schema/
2">
<results>
<result shipping-name="Standard Delivery (3-5 Days)" address-
id="H-7538">
<shipping-rate currency="GBP">0</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
<result shipping-name="Next Working Day" address-id="H-7538">
<shipping-rate currency="GBP">3.45</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0.52</total-tax>
</result>
<result shipping-name="Standard Delivery (3-5 Days)" address-
id="3414912">
<shipping-rate currency="GBP">0</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
<result shipping-name="Next Working Day" address-id="3414912">
<shipping-rate currency="GBP">3.45</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0.52</total-tax>
</result>
</results>
</merchant-calculation-results>

This is returned to a page which has a content-type of text/xml in the page
header.  However google is not updatting the pages. As far as i can tell the
xml is correct according to the api, so there is something i must be
overlooking in my code which is as follows.

         my $addresses = $callback->get_addresses;

       my $return .= qq|<?xml version="1.0" encoding="UTF-8"?>\n<merchant-
calculation-results xmlns="http://checkout.google.com/schema/2">
\n<results>\n|;

       for my $address (@$addresses)
       {

               $ret = <<__ADDRESS__;
       Address:      $address->{id}
       Country code: $address->{country_code}
       City:         $address->{city}
       Postal code:  $address->{postal_code}
       Region:       $address->{region}

__ADDRESS__

       $return .= qq|<result shipping-name="Standard Delivery (3-5 Days)"
address-id="$address->{id}">\n<shipping-rate currency="GBP">0</
shipping-rate>\n<shippable>true</shippable>\n<total-tax
currency="GBP">0</total-tax>\n</result>\n<result shipping-name="Next
Working Day" address-id="$address->{id}">\n<shipping-rate
currency="GBP">3.45</shipping-rate>\n<shippable>true</shippable>
\n<total-tax currency="GBP">0.52</total-tax>\n</result>\n|;

       }

       $return .= qq|</results>\n</merchant-calculation-results>|;

As stated before google is calling the page with this code as i can see the
xml output in the logs but it does not update the shiipping prices.

Hopefully this post is a bit clearer.

Graham Hadgraft

On Thu, Jul 2, 2009 at 5:42 PM, Jerry Krinock <je...@sheepsystems.com>wrote:

--
====================================
http://www.8bitscraps.co.uk  -  Tech Tips & tools

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »