diff --git a/CHANGELOG.md b/CHANGELOG.md index 7133089..5d7d17a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +* 4.49 (2017-01-05) + * removal of autoload inclusion in main PaylineSDK.php file + * fix of `SOAP_DOCUMENT` and `SOAP_LITERAL` constants use in main PaylineSDK.php file + * new optional parameters defaultTimezone and externalLogger for PaylineSDK class constructor + * 4.48 (2016-09-13) * new properties version and TransactionDate for getAlertDetailsRequest diff --git a/README.md b/README.md index da88069..007376b 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,9 @@ Usage use Payline\PaylineSDK; // create an instance - $paylineSDK = new PaylineSDK($merchant_id, $access_key, $proxy_host, $proxy_port, $proxy_login, $proxy_password, $environment[, $pathLog= null[, $logLevel = Logger::INFO]]); + $paylineSDK = new PaylineSDK($merchant_id, $access_key, $proxy_host, $proxy_port, $proxy_login, $proxy_password, $environment[, $pathLog= null[, $logLevel = Logger::INFO[, $externalLogger = null[, $defaultTimezone = "Europe/Paris"]]]]); /* + $merchant_id, the merchant identifier, has to be a string. $environment determines in which Payline environment your request are targeted. It should be filled with either PaylineSDK::ENV_HOMO (for testing purpose) or PaylineSDK::ENV_PROD (real life) If $pathLog is null, log files will be written under default logs directory. Fill with your custom log files path diff --git a/src/Payline/PaylineSDK.php b/src/Payline/PaylineSDK.php index 95ddd00..c4e850d 100644 --- a/src/Payline/PaylineSDK.php +++ b/src/Payline/PaylineSDK.php @@ -16,7 +16,6 @@ $vendorPath = realpath(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . DIRECTORY_SEPARATOR; $classesPath = $vendorPath . 'monext' . DIRECTORY_SEPARATOR . 'payline-sdk' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'Payline' . DIRECTORY_SEPARATOR; -require_once $vendorPath . 'autoload.php'; require_once $classesPath . 'Payment.class.php'; require_once $classesPath . 'Order.class.php'; require_once $classesPath . 'OrderDetail.class.php'; @@ -41,12 +40,12 @@ class PaylineSDK /** * Payline release corresponding to this version of the package */ - const SDK_RELEASE = 'PHP SDK 4.48'; + const SDK_RELEASE = 'PHP SDK 4.49'; /** * WSDL file name */ - const WSDL = 'v4.48.wsdl'; + const WSDL = 'v4.49.wsdl'; /** * development environment flag @@ -316,11 +315,17 @@ class PaylineSDK * path to your custom log folder, must end by directory separator. If null, default logs folder is used. Default : null * @param int $logLevel * Monolog\Logger log level. Default : Logger::INFO + * @param Monolog\Logger $externalLogger + * Monolog\Logger instance, used by PaylineSDK but external to it */ - function __construct($merchant_id, $access_key, $proxy_host, $proxy_port, $proxy_login, $proxy_password, $environment, $pathLog = null, $logLevel = Logger::INFO) + function __construct($merchant_id, $access_key, $proxy_host, $proxy_port, $proxy_login, $proxy_password, $environment, $pathLog = null, $logLevel = Logger::INFO, $externalLogger = null, $defaultTimezone = "Europe/Paris") { - date_default_timezone_set("Europe/Paris"); - $this->logger = new Logger('PaylineSDK'); + date_default_timezone_set($defaultTimezone); + if($externalLogger){ + $this->logger = $externalLogger; + }else{ + $this->logger = new Logger('PaylineSDK'); + } if (is_null($pathLog)) { $this->logger->pushHandler(new StreamHandler(realpath(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'logs' . DIRECTORY_SEPARATOR . date('Y-m-d') . '.log', $logLevel)); // set default log folder } elseif (strlen($pathLog) > 0) { @@ -357,8 +362,8 @@ function __construct($merchant_id, $access_key, $proxy_host, $proxy_port, $proxy $this->webServicesEndpoint = PaylineSDK::INT_ENDPOINT; $plnInternal = true; } - $this->soapclient_options['style'] = defined(SOAP_DOCUMENT) ? SOAP_DOCUMENT : 2; - $this->soapclient_options['use'] = defined(SOAP_LITERAL) ? SOAP_LITERAL : 2; + $this->soapclient_options['style'] = defined('SOAP_DOCUMENT') ? SOAP_DOCUMENT : 2; + $this->soapclient_options['use'] = defined('SOAP_LITERAL') ? SOAP_LITERAL : 2; $this->soapclient_options['connection_timeout'] = 5; if($plnInternal){ $this->soapclient_options['stream_context'] = stream_context_create( @@ -1587,9 +1592,11 @@ public function verifyEnrollment($array) 'userAgent' => $array['userAgent'], 'mdFieldValue' => $array['mdFieldValue'], 'walletId' => $array['walletId'], - 'walletCardInd' => $array['walletCardInd'], - 'generateVirtualCvx' => $array['generateVirtualCvx'] + 'walletCardInd' => $array['walletCardInd'] ); + if (isset($array['generateVirtualCvx'])) { + $WSRequest['generateVirtualCvx'] = $array['generateVirtualCvx']; + } return $this->webServiceRequest($array, $WSRequest, PaylineSDK::DIRECT_API, 'verifyEnrollment'); } diff --git a/src/Payline/v4.49.wsdl b/src/Payline/v4.49.wsdl new file mode 100644 index 0000000..3fdd0d0 --- /dev/null +++ b/src/Payline/v4.49.wsdl @@ -0,0 +1,3518 @@ + + + + + + + + + + This element is the request for the + doWebPayment + method + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + doWebPayment + method + + + + + + + + + + + + + + + + + This element is the reponse from the + getWebPayment + method + + + + + + + + + + + + + This element is the reponse from the + doWebPayment + method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the request for the + doAuthorization + method + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + doAuthorization method + + + + + + + + + + + + + + + + + + This element is the request for the + doCapture method + + + + + + + + + + + + + + + + + This element is the reponse from the + doCapture + method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the request for the doRefund + method + + + + + + + + + + + + + + + + + + This element is the reponse from the + doRefund method + + + + + + + + + + + + + This element is the request for the doReset + method + + + + + + + + + + + + + + + This element is the reponse from the doReset + method + + + + + + + + + + + + + This element is the request for the doCredit + method + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + doCredit method + + + + + + + + + + + + + + + This element is the request for the + createWallet + method + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + createWallet + method + + + + + + + + + + + + + + + + This element is the request for the + updateWallet + method + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + updateWallet + method + + + + + + + + + + + + + + + This element is the request for the + getWallet method + + + + + + + + + + + + + + + + This element is the reponse from the + getWallet + method + + + + + + + + + + + + + + + + + + + + This element is the request for the + getCards method + + + + + + + + + + + + + + + This element is the reponse from the + getCards method + + + + + + + + + + + + + + + This element is the request for the + disableWallet + method + + + + + + + + + + + + + + This element is the reponse from the + disableWallet + method + + + + + + + + + + + + + This element is the request for the + enableWallet + method + + + + + + + + + + + + + + This element is the reponse from the + enableWallet + method + + + + + + + + + + + + This element is the request for the + doImmediateWalletPayment method + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + doImmediateWalletPayment method + + + + + + + + + + + + + + This element is the request for the + doScheduledWalletPayment method + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + doScheduledWalletPayment method + + + + + + + + + + + + + This element is the request for the + doRecurrentWalletPayment method + + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + doRecurrentWalletPayment method + + + + + + + + + + + + + + This element is the request for the + getPaymentRecord method + + + + + + + + + + + + + + This element is the reponse from the + getPaymentRecord method + + + + + + + + + + + + + + + + + + + This element is the request for the + disablePaymentRecord method + + + + + + + + + + + + + This element is the reponse from the + disablePaymentRecord method + + + + + + + + + + + + This element is the request for the + manageWebWallet + method + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + manageWebWallet method + + + + + + + + + + + + + + This element is the request for the + createWebWallet + method + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + createWebWallet method + + + + + + + + + + + + + + This element is the request for the + updateWebWallet + method + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + updateWebWallet method + + + + + + + + + + + + + + This element is the request for the + getWebWallet + method + + + + + + + + + + + + + This element is the reponse from the + getWebWallet + method + + + + + + + + + + + + + + + + + + + This element is the request for the + getTransactionDetails method + + + + + + + + + + + + + + + + + + This element is the response for the + getTransactionDetails method + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the request for the + transactionsSearch method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the response for the + transactionsSearch method + + + + + + + + + + + + + This element is the request for the + verifyEnrollment method + + + + + + + + + + + + + + + + + + + + This element is the reponse from the + verifyEnrollment method + + + + + + + + + + + + + + + + + + + + + + + + This element is the request for the + doAuthentication method + + + + + + + + + + + + + + + + This element is the reponse from the + doAuthentication method + + + + + + + + + + + + + + This element is the request for the + createMerchant + method + + + + + + + + currency in ISO 4217 numeric format + + + + + + + + + + + unique national merchant ID + + + + + + Systeme d identification du Repertoire des + ENtreprises + + + + + + + + + + + to use if country is not France + + + + + + + + + Payline Distributor ID + + + + + + + + + list of point of sell + + + + + + + + + + Billing partner. 1:monext, 2:cetib, 3:payline.com + + + + + + + + + + + This element is the reponse from the + createMerchant + method + + + + + + + + + + + + + This element is the request for the + doScoringCheque + method + + + + + + + + + + + + + + + + + This element is the reponse from the + doScoringCheque method + + + + + + + + + + + + + + This element is the request for the + getEncryptionKeyRequest method + + + + + + + + + This element is the reponse from the + getEncryptionKeyResponse method + + + + + + + + + + + + + This element is the request for the + doReAuthorization method + + + + + + + + + + + + + + + + + This element is the reponse from the + doReAuthorization method + + + + + + + + + + + + + + + This element is the request for the + getMerchantSettings method + + + + + + + + + + + + This element is the response from the + getMerchantSettings method + + + + + + + + + + + + + + + + + + + This element is the request for the + getBalance + method + + + + + + + + + + + + + + This element is the reponse from the + getBalance + method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is the request for the doBankTransfer + method + + + + + + + + + + + + + + + + + This element is the reponse from the + doBankTransfer method + + + + + + + + + + + + + + + + This element contains information about the + process + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element contains information about the + order + + + + + + + + + + + + + + + + + + + + + This element contains information about the + encryptionKey + + + + + + + + + + + + + This element contains an array of orderDetail + + + + + + + + + + + This element contains information about the + order + product + + + + + + + + + + + + + + + + + + + This element contains information about the + merchant + private data + + + + + + + + + + + This element contains information about the + transaction + + + + + + + + + + + + + + + + + + + + + + This element contains information about the + fraud + result details + + + + + + + + + + + + This element contains information about the + payment + + + + + + + + + + + + + + + + + + This element contains information about the + authorization + + + + + + + + + + + This element contains information about the card + + + + + + + + + + + + + + + + + + + + This element contains information about the + buyer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element contains information about the + owner + + + + + + + + + + + + + This element contains information about the + address + + + + + + + + + + + + + + + + + + + + + + This element contains information about the + address + + + + + + + + + + + + + + This element contains information about the + capture + + + + + + + + + + + This element contains information about the + refund + + + + + + + + + + + This element contains the list of selected card + + + + + + + + + + An array of private data + + + + + + + + + + An array of contract number of a wallet + + + + + + + + + + An array of cards + + + + + + + + + + This element contains element for recurring + operation + + + + + + + + + + + + + + + + + + This element contains element for update a recurring + operation + + + + + + + + + + + + + + This element contains element for a billing + record + + + + + + + + + + + + + + + + + An array of billing record + + + + + + + + + + + This element contains element for update a recurring + operation + + + + + + + + + + + + + + This element contains element for a wallet + + + + + + + + + + + + + + + + + + + This element contains element for a wallet + + + + + + + + + + + + + + + + + + + + + This element contains the list of selected card + + + + + + + + + + This element contains the list of selected card + + + + + + + + + + This element contains element for a 3DSecure + transaction + + + + + + + + + + + + + + + + + + + This element contains the merchant connection + parameters + + + + + + + + + + + + + + This element contains the scoring cheque parameters + + + + + + + + + + + + + This element contains information about Interlocutor + address + + + + + + + + + + + + + + + This element contains information about Interlocutor + + + + + + + + + + + + + + + + An array of subscribed options + + + + + + + + + + + + This element contains information about the payline + package subscribed by the merchant + + + + + + + + + + + This element contains IBAN information + + + + + + + + + + + + + This element contains RIB information + + + + + + + + + + + + This element contains bankAccount information + + + + + + + + + + + + + This element contains bank Account information + + + + + + + + + + + + + This element contains technical data used to define + acquirer service + + + + + + + + + + + + This element contains all information about contract + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element contains all information about + customPaymentPageCode + + + + + + + + + + + + This element contains information e-ticket + + + + + + + + + + + This element contains all information about point of + sell + + + + + + + Merchant Category Code + + + + + + + + + + + + + + + + + + + + list of contract + + + + + + + + + + + list of custom payment page code + + + + + + + + + + + + virtualTerminal + + + + + + http session timeout delay + + + + + path to logo + + + + + list of functions + + + + + + + + + + + + functions availbe in virtual terminal + + + + + + Please refer to Payline documentation + + + + + + + + + + + + + + + Value of parameter + + + + + Parameter ID. Refer to payline documentation + + + + + + + + + + + + This element contains information about the + cheque + + + + + + + + + + This element contains all information about + contrinution + + + + + + + + + + + + + + + This element contains information about the + associated transactions + + + + + + + + + + + + + + + + An array of associatedTransactions + + + + + + + + + + + This element contains information about the + status + History + + + + + + + + + + + + + + + + An array of statusHistory + + + + + + + + + + This element contains information about the + paymentAdditional + + + + + + + + + + + + + + + + An array of paymentAdditionalList + + + + + + + + + + + An array of CustomerTrans + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An array of PaymentMeansTrans + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An array of AlertsTrans + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element contains information about the + creditor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +