Jump to content


This topic is now archived and is closed to further replies.


SOAP Problems

Recommended Posts

I keep getting this error from the SOAP server: Server did not recognize the value of HTTP Header SOAPAction: [a href=\"http://authorize.net/merchantApi/#GetReturns\" target=\"_blank\"]http://authorize.net/merchantApi/#GetReturns[/a]. Which I thought made sense. I know that it is wanting "http://authorize.net/merchantApi/GetReturns". Not sure how or why that pound gets put there, but then I tried to make the same script in Perl with SOAP::Lite and it puts it there too, so I get the exact same error. Think the last time I used SOAP was 2 years ago, so maybe I'm just too rusty. Here is the XML I am needing to produce:

[a href=\"https://account.authorize.net/api/merchantapi.asmx?op=GetReturns\" target=\"_blank\"]https://account.authorize.net/api/merchanta...x?op=GetReturns[/a]

It's a really small call. And here is my current PHP:

class auth {
    private $login;
    private $password;
    public function __construct($login,$password) {
        $this->login = $login;
        $this->password = $password;

$client = new SoapClient(null,
        'location' => 'https://account.authorize.net/api/merchantapi.asmx',
        'uri' => 'http://authorize.net/merchantApi/'

// Tried this way of connecting too.
// $client = new SoapClient('https://account.authorize.net/api/merchantapi.asmx?WSDL');

$auth = new auth('login','password');

$header = new SoapHeader('http://authorize.net/merchantApi/','InHeader', $auth);

$result = $client->__soapCall('GetReturns', array('transactionID' => 123456789), null, $header);

if (is_soap_fault($result)) {
   trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_ERROR);

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.