fk / yii2-pingpp
Ping++ 与 yii2 包装器
dev-master / 1.0.x-dev
2016-09-19 08:32 UTC
Requires
- php: >=5.4
- pingplusplus/pingpp-php: 2.1.5
This package is not auto-updated.
Last update: 2024-09-14 20:04:02 UTC
README
这只是一个 Ping++ (Ping Plus Plus) 的 yii2 包装器
使用方法
配置
# 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 ... ]
调用
Yii::$app->pingpp->charge(); Yii::$app->pingpp->transfer();
特别是
许多参数可以通过调用 setXXX()
传递
例如
Yii::$app->pingpp ->setClientIp('127.0.0.1') ->setChannel('wx_pub') ->setApiKey('sk_test_123ksdfj') ->charge($orderNo);
更多详细信息,请参阅 fk\pingpp\Component