David,
It seems that what you might want is an order management
system. My
product is integrated with Google Checkout, so all you would
need to do
is point your notifications to my site and your orders will
appear
within your company as they are received by GC.
Feel free to check it out. If you have any questions,
please don't
hesitate to ask.
Tony
EZ Order Manager: http://www.ez-order-m
anager.com
-----Original Message-----
From: google-checkout-api-integration googlegroups.com
[mailto:google-checkout-api-integration googlegroups.com] On Behalf Of
David H Dennis
Sent: Saturday, August 25, 2007 10:18 AM
To: Google Checkout Developers Forum - API Integration
Basics
Subject: [google-checkout-api-integration] Automated back
end processing
while using HTML integration
I have a business that I'm working with that buys its
products through a
distributor. The distributor has an XML API for sending
orders.
Usually this means Level 2 integration. But I don't have a
secure
server and would rather not set one up. In addition, I
really don't
want to handle credit card numbers, which I believe you need
to do for
Level 2 integration to happen.
What I would like, however, is the ability to automatically
suck down
the order by logging in to the Google system as though I was
a browser
and then parsing the resulting order page, grabbing each
individual
order and adding it to my system. All of this is well
within my
capabilities as a programmer, with the exception of the
login.
I try to log in to Google Checkout's sandbox and the sandbox
login
returns a redirect to google.com no matter what I do. My
code (in
Ruby) has been added to the end of this message.
Is there any established way to do this sort of thing? I
would like to
do it for adsense reports as well so I could automate their
parsing and
translation into my own format.
Many thanks for any help!
D
-- Code --
def login
# get_session_id works successfully to get the session ID
from Google.
session_id = get_session_id
print "Session: #n"
email = "david amazing.com"
password = '*******'
data = "gsessionid=#&"
data +=
"service=sierrasandbox&nui=1<mp1=default&
h1=sv&"
data += "Email=#&Passwd=#"
data += "&rmShown=1"
site = Net::HTTP.new("sandbox.google.com", 443)
site.use_ssl = true
resp, data = site.get("/checkout", nil)
cookie = resp.response['set-cookie']
print "Cookie #{ cookie.inspect }n"
headers = {
'Cookie' => cookie,
'Referer' => "https:/
/www.google.com/accounts/ServiceLogin?
service=sierrasandbox&continue=https%3A%2F%2Fsandbox.goo
gle.com
%2Fcheckout%2F%3Fupgrade%3Dtrue&hl=sv&nui=1<mp
l=default",
'Content-Type' =>
'application/x-www-form-urlencoded'
}
resp, data = site.post("ServiceLoginAuth", data,
headers)
puts "Code #{ resp.code }nMessage #{ resp.message }
location #{
resp['location'] }ncookie #{ resp['cookie'] }n"
print data
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "API Integration Basics" group.
To post to this group, send email to
google-checkout-api-integration googlegroups.com
To unsubscribe from this group, send email to
google-checkout-api-integration-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/google-checko
ut-api-integration?hl=en
-~----------~----~----~----~------~----~------~--~---
|