Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
4.49.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien SUAREZ committed Mar 7, 2017
1 parent e300e9d commit e620339
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Payline/PaylineSDK.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PaylineSDK
/**
* Payline release corresponding to this version of the package
*/
const SDK_RELEASE = 'PHP SDK 4.49';
const SDK_RELEASE = 'PHP SDK 4.49.1';

/**
* WSDL file name
Expand Down Expand Up @@ -361,6 +361,8 @@ function __construct($merchant_id, $access_key, $proxy_host, $proxy_port, $proxy
} elseif (strcmp($environment, PaylineSDK::ENV_INT) == 0) {
$this->webServicesEndpoint = PaylineSDK::INT_ENDPOINT;
$plnInternal = true;
}else{
$this->webServicesEndpoint = false; // Exception is raised in PaylineSDK::webServiceRequest
}
$this->soapclient_options['style'] = defined('SOAP_DOCUMENT') ? SOAP_DOCUMENT : 2;
$this->soapclient_options['use'] = defined('SOAP_LITERAL') ? SOAP_LITERAL : 2;
Expand Down Expand Up @@ -843,6 +845,9 @@ private function webServiceRequest($array, $WSRequest, $PaylineAPI, $Method)
'result.code' => null
);
try {
if(!$this->webServicesEndpoint){
throw new \Exception('Endpoint error (check `environment` parameter of PaylineSDK constructor)');
}
$client = new SoapClient(dirname(__FILE__) . '/' . PaylineSDK::WSDL, $this->soapclient_options);
$client->__setLocation($this->webServicesEndpoint . $PaylineAPI);

Expand Down

0 comments on commit e620339

Please sign in to comment.