| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace addons\Alitopay\common\logic;
- use common\logic\middleground\base\ApiAbstract;
- use common\models\common\MiddleMch;
- class MiddleApi extends ApiAbstract
- {
- public function __construct(MiddleMch $mch)
- {
- parent::__construct($mch);
- }
- public $api_list = [
- 'apply' => 'alitopay/apply',
- 'setConfig' => 'alitopay/setConfig',
- 'pay' => 'alitopay/pay',
- 'query' => 'alitopay/query',
- ];
- public function setConfig($param)
- {
- $res = $this->request($this->getFullUrl(__FUNCTION__), array_filter($param), 'post');
- return $res;
- }
- public function apply($param)
- {
- $res = $this->request($this->getFullUrl(__FUNCTION__), array_filter($param), 'post');
- return $res;
- }
- public function pay($param)
- {
- $res = $this->request($this->getFullUrl(__FUNCTION__), array_filter($param), 'post');
- return $res;
- }
- public function query($out_batch_no)
- {
- $res = $this->request($this->getFullUrl(__FUNCTION__), ['out_batch_no' => $out_batch_no], 'get');
- return $res;
- }
- }
|