Are there any tutorials out there on how to get the responses back from a Google Checkout transaction when using C# and the GCheckout API. All of the examples I could find were for previous versions of the API and not the current one (2.5). More specifically, I'd like to see an example reply of what Google will post back to me without and HTTPS connection. I know it's minimal data, but I'd still like to see an example of it and see how others are parsing it.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Google sends notification internally
Create a notification page like this:
`
on google checkout setting page set the notification page name and path and you will get the response on that page. To test whether notification page is working or not, try to log the transaction into a txt file and once every thing is working smooth you can remove that code.
In this example PData is a number I send to the google checkout to and get back the same number in notification, I used this to match the transaction with a particular order.
Hope this code will help you;
Note: I just copied my answer from:
C# example for Google Checkout replies?
which was for some reason closed as a duplicate by a moderator (I think merging would have been better given that this question didn't have an answer and the other one did).
--
I wanted this Google API version 2.5 .NET sample code for a long time and finally built it myself:
http://www.capprime.com/software_development_weblog/2010/11/29/UsingTheGoogleCheckout25APIWithASPNETMVCTheMissingSample.aspx
If you need classic WebForms instead of MVC, let me know.
I didn't include samples of what the packets look like, because honestly, it doesn't matter (the API is supposed to wrap the packets). It's not a lot of work to modify the sample in a couple of places and have it send you an e-mail with that data.
Without a HTTPS connection you'll only get a serial number POSTed to you. For safety, you should ensure that the authorisation is correct (there should be an
Authorization
header containing<your mercahnt id>:<your merchant key>
encoded using base64 encoding)You then need to make a call via the Notification-History-API to request details of the update, loosely: