I am trying to parse the error messages from your reply onto the error landing page so that I can get notifications when something goes wrong.
When dealing with declined cards I can get the value from $_GET["response"] however I don't see how to parse the error message for other problems.
for example my GET variable string looks like:
/?on=Xml%20Error&The%20%27urn:APISchema.xsd:Expirat ionDate%27%20element%20is%20invalid%20-%20The%20value%20%271/22%27%20is%20invalid%20according%20to%20its%20data type%20%27String%27%20-%20The%20Pattern%20constraint%20failed.&hashrespon se=ZGEzOWEzZWU1ZTZiNGJkMzI1NWJmZWY5NTYwMTg5MGFmZDg 3OQ==&RefID=Dizzie
and print_R parses it out to
Array ( [on] => Xml Error [The_'urn:APISchema_xsd:ExpirationDate'_element_is_ invalid_-_The_value_'1/22'_is_invalid_according_to_its_datatype_'String'_-_The_Pattern_constraint_failed_] => [hashresponse] => ZGEzOWEzZWU1ZTZiNGJkMzI1NWJmZWY5NTYwMTg5MGFmZDg3OQ == [RefID] => Dizzie )
what is the syntax to access theXML error message?
TIA appreciate your help!
When dealing with declined cards I can get the value from $_GET["response"] however I don't see how to parse the error message for other problems.
for example my GET variable string looks like:
/?on=Xml%20Error&The%20%27urn:APISchema.xsd:Expirat ionDate%27%20element%20is%20invalid%20-%20The%20value%20%271/22%27%20is%20invalid%20according%20to%20its%20data type%20%27String%27%20-%20The%20Pattern%20constraint%20failed.&hashrespon se=ZGEzOWEzZWU1ZTZiNGJkMzI1NWJmZWY5NTYwMTg5MGFmZDg 3OQ==&RefID=Dizzie
and print_R parses it out to
Array ( [on] => Xml Error [The_'urn:APISchema_xsd:ExpirationDate'_element_is_ invalid_-_The_value_'1/22'_is_invalid_according_to_its_datatype_'String'_-_The_Pattern_constraint_failed_] => [hashresponse] => ZGEzOWEzZWU1ZTZiNGJkMzI1NWJmZWY5NTYwMTg5MGFmZDg3OQ == [RefID] => Dizzie )
what is the syntax to access theXML error message?
TIA appreciate your help!
Comment