Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
27 | public function toPay(string $gateway, array $payload) : Collection |
||
28 | { |
||
29 | $key = $this->config->get('private_key'); |
||
30 | $content = array_merge( |
||
31 | Arr::get($payload, 'biz_content'), |
||
32 | Constant::ALI_PAY_TRANSFER_PRO_CODE |
||
33 | ); |
||
34 | $payload['method'] = Constant::ALI_PAY_TRANSFER; |
||
35 | $payload['biz_content'] = json_encode($content); |
||
36 | $payload['sign'] = self::generateSign($payload, $key); |
||
37 | |||
38 | Log::debug('Transfer order:', [$gateway, $payload]); |
||
39 | |||
40 | return $this->send($payload, $this->config->get('public_key')); |
||
41 | } |
||
43 |