Parsing returned array in javascript
Posted
by Dan
on Stack Overflow
See other posts from Stack Overflow
or by Dan
Published on 2010-05-02T23:41:07Z
Indexed on
2010/05/02
23:48 UTC
Read the original article
Hit count: 235
I'm making a call to PayPal's credit card processor, and after a successful/unsuccessful transaction it returns me a string that looks like this:
DoDirectPayment failed: Array ( [TIMESTAMP] => 2010%2d05%2d02T23%3a33%3a28Z [CORRELATIONID] => 8c503f5c6c861 [ACK] => Failure [VERSION] => 51%2e0 [BUILD] => 1268624 [L_ERRORCODE0] => 10527 [L_SHORTMESSAGE0] => Invalid%20Data [L_LONGMESSAGE0] => This%20transaction%20cannot%20be%20processed%2e%20Please%20enter%20a%20valid%20credit%20card%20number%20and%20type%2e [L_SEVERITYCODE0] => Error [AMT] => 90%2e00 [CURRENCYCODE] => USD )
I'm not a javascript pro, but how exactly can I turn that into a parseable array?
Thank you!
© Stack Overflow or respective owner