API response to invalid subscription update doesn't trigger Exception (PHP)
Hi CG team,
I'm having problems with customers trying to update their
payment info via the API.
Specifically, the PHP wrapper throws exceptions when
documentElement->nodeName == 'error', however, when updating a
subscription, the documentElement->nodeName is "customers".
The response starts as follows:
<error id="867504" code="422" auxCode="5000">There was an error processing the transaction</error>
...etc
This seems different from the behavior when creating a
subscription, where an Exception is thrown in case of a
problem.
Also, the error that's being logged in CG error panel is:
There was an error processing the transaction
* 290:There is one or more missing or invalid required fields.
* message:There is one or more missing or invalid required fields.
How do I find out which fields were offending? Seeing that updating a subscription doesn't have any required fields, and the info I'm passing looks valid to me (it works for creating accounts..), I'm wondering how to go about debugging this.
Thanks for you help, let me know if I can provide more
information.
Daniel
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
1 Posted by Daniel Richter on 20 Jul, 2010 07:27 PM
Apparently the xml I pasted was truncated.. attached is a text file.
Support Staff 2 Posted by Marc Guyer on 21 Jul, 2010 01:49 PM
Daniel -- The 290 error is related only to the liveMode validation mode. If you use liveMode, you are required to perform full address verification which includes street address and zip. More info near the bottom here:
http://support.cheddargetter.com/faqs/getting-started-19/configurin...
Marc Guyer closed this discussion on 21 Jul, 2010 01:49 PM.
Daniel Richter re-opened this discussion on 21 Jul, 2010 05:04 PM
3 Posted by Daniel Richter on 21 Jul, 2010 05:04 PM
Ok, that makes sense and will probably solve the issue.
However, part of what I wanted to point out is that the API wrapper does not throw an Exception when this error occurs.
Daniel
Support Staff 4 Posted by Marc Guyer on 21 Jul, 2010 07:14 PM
I see. I missed that. When there is an embedded error, no exception is thrown using the stock PHP wrapper. You can use the wrapper to check for embedded errors using the CheddarGetter_Response::hasEmbeddedErrors() method if I recall.
Marc Guyer closed this discussion on 21 Jul, 2010 07:14 PM.