Custom Transaction Post Hook
Hi,
As far as i understood the TPH mechanism is once you set it up, and your app makes a process with CG(add/edit/delete) it will ping the url defined on it right?
My question is , is it possible to ping the TPH url only on
edit/delete, not with adding new CG customer?
If not, can you recommend other way to meet my requirements?
Thanks!
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
Support Staff 1 Posted by Marc Guyer on 26 Jan, 2011 03:12 PM
Hi Marvin -- The TPH is sent upon a transaction, not add, edit or delete.
I'm not sure what you're requirements are. Can you describe the use case?
2 Posted by marvin on 27 Jan, 2011 02:05 AM
HI Marc,
In our web-app, when a user signed up an account, we register to CG as well ( Add).
When he updates his info, we updates CG also (edit).
When he UPGRADE his account(plan 1 -> plan 2) we hit the CG for some upgrade plan stuff( we hit CG TPH too right?) , so my question is how can we distinguish from Signup with UPGRADE ?
Thanks again.
Support Staff 3 Posted by Marc Guyer on 27 Jan, 2011 02:31 PM
The TPH is only activated when a transaction occurs. If a signup includes a transaction (subscription to a paid plan which transacts immediately on signup), then the TPH will be activated. If a plan change (upgrade) includes a transaction (prorate method), then the TPH will be sent.
I think the answer to your question is not specifically related to the TPH. Presumably, your app knows the difference between a signup and a plan change. When you submit a signup, or any interaction with a customer for that matter, the response from the API is the full customer XML. You can analyze the xml to determine the state of the customer (signup, plan change, declined transaction, etc.).
If you use the TPH, for whatever reason, you can use the customer code in the TPH to then request the full XML for the customer, then analyze that to determine what you want to do with that information.
Does that answer your question?
4 Posted by marvin on 31 Jan, 2011 02:16 AM
Hi Marc,
Thanks for all your replies.
Marc Guyer closed this discussion on 08 Oct, 2012 09:43 PM.