marciocamello / yii2-paypal
Yii2框架的PayPal扩展
v0.1.1
2014-05-16 16:43 UTC
Requires
- php: >=5.5.0
- ext-curl: *
- ext-json: *
- paypal/rest-api-sdk-php: 0.8.*
- yiisoft/yii2: *
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, ] ],