开发者

Parsing returned array in javascript

I'm making a call to PayPal's credit card proces开发者_Go百科sor, 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!


You haven't said what you want to parse it into: PHP, Python, Ruby, Java, JSON...

But whichever it is, if this is a JSON response, google for your server-side language's main JSON parser. Should be a simple one-liner to parse into whatever you need it to be.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜