PHP code example of marciocamello / yii2-paypal

1. Go to this page and download the library: Download marciocamello/yii2-paypal library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

marciocamello / yii2-paypal example snippets


'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,
    ]
],

php composer.phar