fk/yii2-pingpp

Ping++ with yii2 wrapper

dev-master / 1.0.x-dev 2016-09-19 08:32 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:47:47 UTC


README

This is just a yii2 wrapper for Ping++(Ping Plus Plus)

Usage

Configure

    
    # maim-local.php
    
    return [
        // other config ...
        'components' =>  [
            // other components
            'pingpp' => [
                'class' => 'fk\pingpp\Component',
                'apiKey' => 'sk_test_SCiTC8sd8j2lk34bP',
                'appId' => 'app_Cu1azP0y5Gst2mx03Y',
            ],
            // other components
        ]
        // other config ...
        
    ]

Call

    Yii::$app->pingpp->charge();
    Yii::$app->pingpp->transfer();

Especially

Many params can be passed by calling setXXX()

For Example

    Yii::$app->pingpp
        ->setClientIp('127.0.0.1')
        ->setChannel('wx_pub')
        ->setApiKey('sk_test_123ksdfj')
        ->charge($orderNo);

For more details, please refer to fk\pingpp\Component