marciocamello/yii2-paypal

Yii2框架的PayPal扩展

安装数: 5,139

依赖关系: 0

建议者: 0

安全性: 0

星标: 36

关注者: 7

分支: 38

类型:yii2-extension

v0.1.1 2014-05-16 16:43 UTC

This package is not auto-updated.

Last update: 2024-09-24 15:48:34 UTC


README

为Yii2提供的PayPal支付扩展。

安装

在composer.json文件中添加以下部分

php composer.phar require --prefer-dist marciocamello/yii2-paypal "*"
"marciocamello/yii2-paypal": "dev-master"

在您的Yii2配置文件中添加以下部分,包含组件设置

'paypal'=> [
    'class'        => 'marciocamello\Paypal',
    'clientId'     => 'you_client_id',
    'clientSecret' => 'you_client_secret',
    'isProduction' => false,
     // This is config file for the PayPal system
     'config'       => [
         'http.ConnectionTimeOut' => 30,
         'http.Retry'             => 1,
         'mode'                   => \marciocamello\Paypal::MODE_SANDBOX, // development (sandbox) or production (live) mode
         'log.LogEnabled'         => YII_DEBUG ? 1 : 0,
         'log.FileName'           => '@runtime/logs/paypal.log',
        'log.LogLevel'           => \marciocamello\Paypal::LOG_LEVEL_FINE,
    ]
],