@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | $rocket->setPayload([ |
45 | 45 | '_method' => 'GET', |
46 | - '_url' => 'v3/transfer/bill-receipt/'.$outBatchNo, |
|
46 | + '_url' => 'v3/transfer/bill-receipt/' . $outBatchNo, |
|
47 | 47 | ]); |
48 | 48 | |
49 | 49 | Logger::info('[Wechat][Marketing][Transfer][Receipt][QueryPlugin] 插件装载完毕', ['rocket' => $rocket]); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $rocket->setPayload([ |
47 | 47 | '_method' => 'GET', |
48 | - '_url' => 'v3/transfer/batches/batch-id/'.$batchId.'?'.filter_params($payload)->except('batch_id')->query(), |
|
48 | + '_url' => 'v3/transfer/batches/batch-id/' . $batchId . '?' . filter_params($payload)->except('batch_id')->query(), |
|
49 | 49 | ]); |
50 | 50 | |
51 | 51 | Logger::info('[Wechat][Marketing][Transfer][Batch][QueryByWxPlugin] 插件装载完毕', ['rocket' => $rocket]); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $rocket->setPayload([ |
47 | 47 | '_method' => 'GET', |
48 | - '_url' => 'v3/transfer/batches/out-batch-no/'.$outBatchNo.'?'.filter_params($payload)->except('out_batch_no')->query(), |
|
48 | + '_url' => 'v3/transfer/batches/out-batch-no/' . $outBatchNo . '?' . filter_params($payload)->except('out_batch_no')->query(), |
|
49 | 49 | ]); |
50 | 50 | |
51 | 51 | Logger::info('[Wechat][Marketing][Transfer][Batch][QueryPlugin] 插件装载完毕', ['rocket' => $rocket]); |
@@ -32,8 +32,8 @@ |
||
32 | 32 | |
33 | 33 | $rocket->setPayload([ |
34 | 34 | '_method' => 'GET', |
35 | - '_url' => 'v3/marketing/favor/callbacks?mchid='.$mchId, |
|
36 | - '_service_url' => 'v3/marketing/favor/callbacks?mchid='.$mchId, |
|
35 | + '_url' => 'v3/marketing/favor/callbacks?mchid=' . $mchId, |
|
36 | + '_service_url' => 'v3/marketing/favor/callbacks?mchid=' . $mchId, |
|
37 | 37 | ]); |
38 | 38 | |
39 | 39 | Logger::info('[Wechat][Marketing][Coupon][Callback][QueryPlugin] 插件装载完毕', ['rocket' => $rocket]); |
@@ -43,8 +43,8 @@ |
||
43 | 43 | |
44 | 44 | $rocket->setPayload([ |
45 | 45 | '_method' => 'GET', |
46 | - '_url' => 'v3/marketing/favor/users/'.$openId.'/coupons/'.$couponId.'?appid='.$appId, |
|
47 | - '_service_url' => 'v3/marketing/favor/users/'.$openId.'/coupons/'.$couponId.'?appid='.$appId, |
|
46 | + '_url' => 'v3/marketing/favor/users/' . $openId . '/coupons/' . $couponId . '?appid=' . $appId, |
|
47 | + '_service_url' => 'v3/marketing/favor/users/' . $openId . '/coupons/' . $couponId . '?appid=' . $appId, |
|
48 | 48 | ]); |
49 | 49 | |
50 | 50 | Logger::info('[Wechat][V3][Marketing][Coupon][Coupons][DetailPlugin] 插件装载完毕', ['rocket' => $rocket]); |
@@ -43,8 +43,8 @@ |
||
43 | 43 | |
44 | 44 | $rocket->setPayload([ |
45 | 45 | '_method' => 'GET', |
46 | - '_url' => 'v3/marketing/favor/users/'.$openId.'/coupons?'.$this->normal($payload, $params, $config), |
|
47 | - '_service_url' => 'v3/marketing/favor/users/'.$openId.'/coupons?'.$this->normal($payload, $params, $config), |
|
46 | + '_url' => 'v3/marketing/favor/users/' . $openId . '/coupons?' . $this->normal($payload, $params, $config), |
|
47 | + '_service_url' => 'v3/marketing/favor/users/' . $openId . '/coupons?' . $this->normal($payload, $params, $config), |
|
48 | 48 | ]); |
49 | 49 | |
50 | 50 | Logger::info('[Wechat][V3][Marketing][Coupon][Coupons][QueryUserPlugin] 插件装载完毕', ['rocket' => $rocket]); |
@@ -44,8 +44,8 @@ |
||
44 | 44 | $rocket->setPayload(array_merge( |
45 | 45 | [ |
46 | 46 | '_method' => 'POST', |
47 | - '_url' => 'v3/marketing/favor/users/'.$openId.'/coupons', |
|
48 | - '_service_url' => 'v3/marketing/favor/users/'.$openId.'/coupons', |
|
47 | + '_url' => 'v3/marketing/favor/users/' . $openId . '/coupons', |
|
48 | + '_service_url' => 'v3/marketing/favor/users/' . $openId . '/coupons', |
|
49 | 49 | ], |
50 | 50 | $this->normal($payload, $params, $config), |
51 | 51 | )); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * @throws ContainerException |
62 | 62 | */ |
63 | - public static function config(array $config = [], null|Closure|ContainerInterface $container = null): bool |
|
63 | + public static function config(array $config = [], null | Closure | ContainerInterface $container = null): bool |
|
64 | 64 | { |
65 | 65 | $result = Artful::config($config, $container); |
66 | 66 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | return Artful::get($service); |
89 | 89 | } |
90 | 90 | |
91 | - public static function setContainer(null|Closure|ContainerInterface $container): void |
|
91 | + public static function setContainer(null | Closure | ContainerInterface $container): void |
|
92 | 92 | { |
93 | 93 | Artful::setContainer($container); |
94 | 94 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | $result = $this->getCertSn($ssl['issuer'] ?? [], $ssl['serialNumber'] ?? ''); |
119 | 119 | |
120 | - Pay::get(ConfigInterface::class)->set('alipay.'.$tenant.'.app_public_cert_sn', $result); |
|
120 | + Pay::get(ConfigInterface::class)->set('alipay.' . $tenant . '.app_public_cert_sn', $result); |
|
121 | 121 | |
122 | 122 | return $result; |
123 | 123 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | continue; |
148 | 148 | } |
149 | 149 | |
150 | - $ssl = openssl_x509_parse($cert.'-----END CERTIFICATE-----'); |
|
150 | + $ssl = openssl_x509_parse($cert . '-----END CERTIFICATE-----'); |
|
151 | 151 | |
152 | 152 | if (false === $ssl) { |
153 | 153 | throw new InvalidConfigException(Exception::CONFIG_ALIPAY_INVALID, '配置异常: 解析 `alipay_root_cert` 失败'); |
@@ -156,20 +156,20 @@ discard block |
||
156 | 156 | $detail = $this->formatCert($ssl); |
157 | 157 | |
158 | 158 | if ('sha1WithRSAEncryption' == $detail['signatureTypeLN'] || 'sha256WithRSAEncryption' == $detail['signatureTypeLN']) { |
159 | - $sn .= $this->getCertSn($detail['issuer'], $detail['serialNumber']).'_'; |
|
159 | + $sn .= $this->getCertSn($detail['issuer'], $detail['serialNumber']) . '_'; |
|
160 | 160 | } |
161 | 161 | } |
162 | 162 | |
163 | 163 | $result = substr($sn, 0, -1); |
164 | 164 | |
165 | - Pay::get(ConfigInterface::class)->set('alipay.'.$tenant.'.alipay_root_cert_sn', $result); |
|
165 | + Pay::get(ConfigInterface::class)->set('alipay.' . $tenant . '.alipay_root_cert_sn', $result); |
|
166 | 166 | |
167 | 167 | return $result; |
168 | 168 | } |
169 | 169 | |
170 | 170 | protected function getCertSn(array $issuer, string $serialNumber): string |
171 | 171 | { |
172 | - return md5($this->array2string(array_reverse($issuer)).$serialNumber); |
|
172 | + return md5($this->array2string(array_reverse($issuer)) . $serialNumber); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | protected function array2string(array $array): string |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $string = []; |
178 | 178 | |
179 | 179 | foreach ($array as $key => $value) { |
180 | - $string[] = $key.'='.$value; |
|
180 | + $string[] = $key . '=' . $value; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | return implode(',', $string); |