| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function toPay(string $gateway, array $payload) : Response |
||
| 27 | { |
||
| 28 | $key = $this->config->get('private_key'); |
||
| 29 | $content = array_merge( |
||
| 30 | Arr::get($payload, 'biz_content'), |
||
| 31 | Constant::ALI_PAY_WAP_PRO_CODE |
||
| 32 | ); |
||
| 33 | self::check($content); |
||
| 34 | $payload['method'] = Constant::ALI_PAY_WAP_PAY; |
||
| 35 | $payload['biz_content'] = json_encode($content); |
||
| 36 | $payload['sign'] = self::generateSign($payload, $key); |
||
| 37 | |||
| 38 | Log::debug('Wap order:', [$gateway, $payload]); |
||
| 39 | |||
| 40 | $body = $this->buildRequestForm($gateway, $payload); |
||
| 41 | |||
| 42 | return Response::create($body); |
||
| 43 | } |
||
| 45 |