| Total Complexity | 3 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class GiftCardClient extends BaseClient |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * 申请微信支付礼品卡权限接口 |
||
| 25 | * |
||
| 26 | * @param string $subMchId |
||
| 27 | * |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | 1 | public function add(string $subMchId) |
|
| 31 | { |
||
| 32 | $params = [ |
||
| 33 | 1 | 'sub_mch_id' => $subMchId |
|
| 34 | ]; |
||
| 35 | |||
| 36 | 1 | return $this->httpPostJson('card/giftcard/pay/whitelist/add', $params); |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * 绑定商户号到礼品卡小程序接口(商户号必须为公众号申请的商户号,否则报错) |
||
| 41 | * |
||
| 42 | * @param string $subMchId |
||
| 43 | * @param string $wxaAppid |
||
| 44 | * |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | 1 | public function bind(string $subMchId, string $wxaAppid) |
|
| 48 | { |
||
| 49 | $params = [ |
||
| 50 | 1 | 'sub_mch_id' => $subMchId, |
|
| 51 | 1 | 'wxa_appid' => $wxaAppid |
|
| 52 | ]; |
||
| 53 | |||
| 54 | 1 | return $this->httpPostJson('card/giftcard/pay/submch/bind', $params); |
|
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * 上传小程序代码 |
||
| 59 | * |
||
| 60 | * @param string $wxaAppid |
||
| 61 | * @param string $pageId |
||
| 62 | * |
||
| 63 | * @return mixed |
||
| 64 | */ |
||
| 65 | 1 | public function set(string $wxaAppid, string $pageId) |
|
| 73 | } |
||
| 74 | } |
||
| 75 |