Search code examples
phpmagentomagento-soap-api

SOAP Error when trying to use the Cybersource module within Magento


I have tried to find a more specific answer and could not find anything helpful in regards to this error. It may simply be that I am unfamiliar with Magento or the cybersource module or both but either way, I just cannot understand what this message is trying to tell me.

This is an exception that not only shows up while debugging but also if I capture all SMTP traffic going out on my dev machine, it shows up in the email that you would get upon failure.

Exception: Strict Notice: Declaration of Mage_Cybersource_Model_Api_ExtendedSoapClient::__doRequest() 
should be compatible with that of SoapClient::__doRequest()  in
C:\code\app\code\local\Mage\Cybersource\Model\Api\ExtendedSoapClient.php on line 75 
in C:\code\app\code\core\Mage\Core\functions.php on line 245

what I am doing when this occurs is trying to submit an order. I have added items to the shopping cart, logged in, put in shipping data and reviewed the order and when I hit Submit Order, it chunks for a while and gives me this message. When I debug through the code (which takes FOREVER) I finally get to the point where the cybersource module is trying to authorize through the SOAP system and then it throws this error.

the exact placement it errors is around this method

protected function getSoapApi($options = array())
{
    $wsdl = $this->getConfigData('test') ? self::WSDL_URL_TEST  : self::WSDL_URL_LIVE;
    return new Mage_Cybersource_Model_Api_ExtendedSoapClient($wsdl, $options);
}

any ideas would be very helpful on what to look for or even what this message means. Also, I have SOAP installed and enabled in PHP 5.3.6 running in a windows environment with apache 2.2.


Solution

  • This is actually a PHP error about subclassing SoapClient. Basically, it happens when you have something like this:

    class Foo {
        public function doSomething() {
          // ...
        }
    }
    
    class Bar extends Foo {
        public function doSomething($totallyUnreasonableParameter) {
          // ...
        }
    }
    

    Your issue is almost certainly an issue with the version of SOAP installed on your server. I haven't seen this in particular, but it could have to do with the PHP version (5.3.6) which I am not aware of as a supported version.

    Hope that helps!

    Thanks, Joe