Example #1
0
 public function registerClient($client_registration, $bank_account)
 {
     $options = array('trace' => 1, 'compression' => true, 'exceptions' => true);
     $wsdl_headers = get_headers(self::$partner_api_url);
     $http_text = explode(' ', $wsdl_headers[0]);
     $http_code = (int) $http_text[1];
     if ($http_code != 200) {
         throw new Exception($this->l('Error! No access to SOAP service.'));
     } else {
         $soap_client = new SoapClient(self::$partner_api_url, $options);
         $auth = array('applicationId' => self::$partner_application_id, 'licenceKey' => self::$partner_service_key, 'sandbox' => (bool) false);
         if ($soap_client) {
             return $soap_client->registerClient($auth, $client_registration, $bank_account);
         } else {
             return false;
         }
     }
 }