Sample of what's returned from push notification

chad.thiele's Avatar

chad.thiele

07 Oct, 2010 02:02 PM

I'm looking at the page that shows this is what's returned:

customer[code] => MILTON_WADDAMS
customer[id] => e5121ec6-eea8-102c-b79f-646bec60195d
invoice[id] => e516695e-eea8-102c-b79f-646bec60195d
invoice[invoiceNumber] => 3524
invoice[type] => subscription
transaction[id] => e51cb6ec-eea8-102c-b79f-646bec60195d
transaction[amount] => 651.85
transaction[transactedDatetime] => 2009-09-09T11:52:01-04:00
transaction[response] => approved

Can I get a sample full XML document that is returned? Need to know the exact schema so I can parse it correctly.

I'm trying to build a listener in C# that will take action when transaction and cancellation notifications come in.

Thanks!

  1. Support Staff 1 Posted by Marc Guyer on 07 Oct, 2010 09:30 PM

    Marc Guyer's Avatar

    Chad -- It's actually raw post in the format you've stated, not XML. You can also get a test post to your URL if you set up an endpoint. Then, you can test the post as received.

  2. Marc Guyer closed this discussion on 07 Oct, 2010 09:30 PM.

  3. chad.thiele re-opened this discussion on 09 Oct, 2010 11:47 AM

  4. 2 Posted by chad.thiele on 09 Oct, 2010 11:47 AM

    chad.thiele's Avatar

    I'm curious. Customers cancel their subscriptions through a form on my site: which calls the API to cancel their subscription on CG. Right then and there, I set an end of term date on their account to the next billing date on the latest invoice.

    In C# like this:

    User.EndOfTermDate = Customer.Subscriptions[0].Invoices[0].BillingDateTime;

    I then have a nightly task that checks for users past their end of term and deactivates them. There wouldn't be a need for hooking into the cancellation events would there?

    I think I would need approved and declined transaction events only. Approved to update the end of term, and declined to deactivate immediately (I'm assuming declined occurs when a card cannot be charged on the billing date, am I correct?).

    Do I have this right?

  5. Support Staff 3 Posted by Marc Guyer on 11 Oct, 2010 06:44 PM

    Marc Guyer's Avatar

    Chad -- That all sounds correct.

  6. Marc Guyer closed this discussion on 11 Oct, 2010 06:44 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM