|
@@ -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("'","'",$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("'", "'", $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'], |