@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | $this->payload['biz_content'] = json_encode($params); |
125 | 125 | |
126 | - $gateway = get_class($this).'\\'.Str::studly($gateway).'Gateway'; |
|
126 | + $gateway = get_class($this) . '\\' . Str::studly($gateway) . 'Gateway'; |
|
127 | 127 | |
128 | 128 | if (class_exists($gateway)) { |
129 | 129 | return $this->makePay($gateway); |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | $app = new $gateway(); |
333 | 333 | |
334 | 334 | if ($app instanceof GatewayInterface) { |
335 | - return $app->pay($this->gateway, array_filter($this->payload, function ($value) { |
|
335 | + return $app->pay($this->gateway, array_filter($this->payload, function($value) { |
|
336 | 336 | return $value !== '' && !is_null($value); |
337 | 337 | })); |
338 | 338 | } |
@@ -47,10 +47,10 @@ |
||
47 | 47 | */ |
48 | 48 | protected function buildPayHtml($endpoint, $payload): Response |
49 | 49 | { |
50 | - $sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='".$endpoint."' method='POST'>"; |
|
50 | + $sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='" . $endpoint . "' method='POST'>"; |
|
51 | 51 | foreach ($payload as $key => $val) { |
52 | 52 | $val = str_replace("'", ''', $val); |
53 | - $sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>"; |
|
53 | + $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>"; |
|
54 | 54 | } |
55 | 55 | $sHtml .= "<input type='submit' value='ok' style='display:none;'></form>"; |
56 | 56 | $sHtml .= "<script>document.forms['alipaysubmit'].submit();</script>"; |