k3dsarl/payline-sdk
最新稳定版本:v1
Composer 安装命令:
composer require k3dsarl/payline-sdk
包简介
Payline library for PHP - test with monolog 3.0 for symfony 6
README 文档
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.6 and over Requires monolog/monolog and symfony/cache, just let Composer do the job
In order to make http call for failover, ext-curl is mark has required, it can be commented if you disable failover or set allow_url_fopen to true in php.ini (in order to use file_get_contents)
Author
Payline support - support@payline.com
License
Payline is licensed under the LGPL-3.0+ License - see the LICENSE file for details
统计信息
- 总下载量: 301
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2022-12-16