monext / payline-sdk
Payline library for PHP
Installs: 396 380
Dependents: 4
Suggesters: 0
Security: 0
Stars: 19
Watchers: 7
Forks: 24
Open Issues: 4
Requires
- php: >=5.3.0
- ext-mbstring: *
- ext-openssl: *
- ext-soap: *
- monolog/monolog: 1.* || ~2.0
- dev-master
- 4.64.1
- 4.59.6
- 4.59.5
- 4.59.4
- 4.59.3
- 4.59.2
- 4.59.1
- 4.59.0
- 4.55.3
- 4.55.2
- 4.55.1
- 4.55
- 4.53
- 4.52.1
- 4.52
- 4.51
- 4.50.2
- 4.50.1
- 4.50
- 4.49.1
- 4.48
- 4.47.1
- 4.47
- 4.46.1
- 4.45.1
- 4.45
- 4.44.1
- dev-integration
- dev-fix/FIX_MERCHANT_SCORE
- dev-fix/ISSUE_46_2
- dev-fix/ISSUE_46
- dev-feature/upgradeV4.59
- dev-fix/FIX_UPDATE_RECORD
- dev-feature/MCRYPT_TO_OPENSSL
This package is auto-updated.
Last update: 2021-02-18 16:34:20 UTC
README
PaylineSDK - Payline library for PHP
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[, $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 */ // call a web service, for example doWebPayment $doWebPaymentRequest = array(); $doWebPaymentRequest['cancelURL'] = 'https://Demo_Shop.com/cancelURL.php'; $doWebPaymentRequest['returnURL'] = 'https://Demo_Shop.com/returnURL.php'; $doWebPaymentRequest['notificationURL'] = 'https://Demo_Shop.com/notificationURL.php'; // PAYMENT $doWebPaymentRequest['payment']['amount'] = 1000; // this value has to be an integer amount is sent in cents $doWebPaymentRequest['payment']['currency'] = 978; // ISO 4217 code for euro $doWebPaymentRequest['payment']['action'] = 101; // 101 stand for "authorization+capture" $doWebPaymentRequest['payment']['mode'] = 'CPT'; // one shot payment // ORDER $doWebPaymentRequest['order']['ref'] = 'myOrderRef_35656'; // the reference of your order $doWebPaymentRequest['order']['amount'] = 1000; // may differ from payment.amount if currency is different $doWebPaymentRequest['order']['currency'] = 978; // ISO 4217 code for euro // CONTRACT NUMBERS $doWebPaymentRequest['payment']['contractNumber'] = '1234567'; $doWebPaymentResponse = $paylineSDK->doWebPayment($doWebPaymentRequest);
Docs
See the doc/ directory for more detailed documentation. More information available on http://support.payline.com.
About
Requirements
Compliant with PHP 5.3 and over Requires monolog/monolog, just let Composer do the job
Author
Payline support - support@payline.com
License
Payline is licensed under the LGPL-3.0+ License - see the LICENSE file for details