zero-perfoliate
zero-perfoliate

Author Topic: Alertpay API problem!  (Read 366 times)

Offline robertf

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
Alertpay API problem!
« on: June 02, 2010, 08:22:39 AM »
Hi everyone!

I'm new here and I got a problem with the Alertpay 'send money' API.

http://dev.alertpay.com/index.php/integration-tools/api/sendmoney-api#faq

Now I tested it and it's working too, but:
the response I get back is this one
Code: [Select]
HTTP/1.1 200 OK Connection: close Date: Wed, 02 Jun 2010 11:00:11 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html RETURNCODE=100&REFERENCENUMBER=&DESCRIPTION=Account%20in%20test%20mode%20%2f%20Transaction%20was%20completed%20successfully&TESTMODE=1
My question is, How do I get values of the variables here?
like
$returncode = ?
$referencenumber = ?
$testmode = ?
...

Can anyone help me with this?

Thank you so much!

Offline Sergey Popov

  • PHP Helpers
  • ***
  • Posts: 31
  • Karma: +0/-0
    • Freelance PHP Developer
Re: Alertpay API problem!
« Reply #1 on: June 04, 2010, 08:08:27 AM »
Looks like this response contain both headers and content. There must be way to get content only. Otherwise you can parse this response using any of these php functions: explode(), split(), preg_split().
Refer to php documentation or PHP Help forum for more info and for answers to your questions