Completed
Push — master ( 8d88b0...6868b4 )
by Songda
01:30
created
src/Pay.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      * 
97 97
      * @version 2017-08-10
98 98
      * 
99
-     * @param   [type]     $gateway [description]
99
+     * @param   string     $gateway [description]
100 100
      * 
101 101
      * @return  [type]              [description]
102 102
      */
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * 
119 119
      * @version 2017-07-30
120 120
      * 
121
-     * @param   [type]     $gateway [description]
121
+     * @param   string     $gateway [description]
122 122
      * 
123 123
      * @return  [type]              [description]
124 124
      */
Please login to merge, or discard this patch.
src/Gateways/Alipay/Alipay.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
      */
197 197
     protected function buildPayHtml()
198 198
     {
199
-        $sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='".$this->gateway."?charset=utf-8' method='POST'>";
200
-        while (list ($key, $val) = each ($this->config)) {
201
-            $val = str_replace("'","&apos;",$val);
202
-            $sHtml.= "<input type='hidden' name='".$key."' value='".$val."'/>";
199
+        $sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='" . $this->gateway . "?charset=utf-8' method='POST'>";
200
+        while (list ($key, $val) = each($this->config)) {
201
+            $val = str_replace("'", "&apos;", $val);
202
+            $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
203 203
         }
204
-        $sHtml = $sHtml."<input type='submit' value='ok' style='display:none;''></form>";
205
-        $sHtml = $sHtml."<script>document.forms['alipaysubmit'].submit();</script>";
204
+        $sHtml = $sHtml . "<input type='submit' value='ok' style='display:none;''></form>";
205
+        $sHtml = $sHtml . "<script>document.forms['alipaysubmit'].submit();</script>";
206 206
         
207 207
         return $sHtml;
208 208
     }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         
225 225
         $data = json_decode($this->post($this->gateway, $this->config), true);
226 226
 
227
-        if (! isset($data[$method]['code']) || $data[$method]['code'] !== '10000') {
227
+        if (!isset($data[$method]['code']) || $data[$method]['code'] !== '10000') {
228 228
             throw new GatewayException(
229 229
                 'get result error:' . $data[$method]['msg'] . ' - ' . $data[$method]['sub_msg'],
230 230
                 $data[$method]['code'],
Please login to merge, or discard this patch.