作者 lihan
1 个管道 的构建 通过 耗费 0 秒

支付宝

@@ -408,27 +408,24 @@ class AopClient { @@ -408,27 +408,24 @@ class AopClient {
408 * @return 提交表单HTML文本 408 * @return 提交表单HTML文本
409 */ 409 */
410 protected function buildRequestForm($para_temp) { 410 protected function buildRequestForm($para_temp) {
411 - if(cmf_is_wechat()) {  
412 - return $this->gatewayUrl . "?charset=" . trim($this->postCharset);  
413 - }else {  
414 - $sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='" . $this->gatewayUrl . "?charset=" . trim($this->postCharset) . "' method='POST'>";  
415 - //while (list ($key, $val) = each ($para_temp)) {  
416 - foreach ($para_temp as $key => $val) {  
417 - if (false === $this->checkEmpty($val)) {  
418 - //$val = $this->characet($val, $this->postCharset);  
419 - $val = str_replace("'", "&apos;", $val);  
420 - //$val = str_replace("\"","&quot;",$val);  
421 - $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";  
422 - }  
423 - }  
424 -  
425 - //submit按钮控件请不要含有name属性  
426 - $sHtml = $sHtml . "<input type='submit' value='ok' style='display:none;''></form>";  
427 -  
428 - $sHtml = $sHtml . "<script>document.forms['alipaysubmit'].submit();</script>";  
429 -  
430 - return $sHtml; 411 +
  412 + $sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='".$this->gatewayUrl."?charset=".trim($this->postCharset)."' method='POST'>";
  413 + //while (list ($key, $val) = each ($para_temp)) {
  414 + foreach ($para_temp as $key => $val) {
  415 + if (false === $this->checkEmpty($val)) {
  416 + //$val = $this->characet($val, $this->postCharset);
  417 + $val = str_replace("'","&apos;",$val);
  418 + //$val = str_replace("\"","&quot;",$val);
  419 + $sHtml.= "<input type='hidden' name='".$key."' value='".$val."'/>";
  420 + }
431 } 421 }
  422 +
  423 + //submit按钮控件请不要含有name属性
  424 + $sHtml = $sHtml."<input type='submit' value='ok' style='display:none;''></form>";
  425 +
  426 + $sHtml = $sHtml."<script>document.forms['alipaysubmit'].submit();</script>";
  427 +
  428 + return $sHtml;
432 } 429 }
433 430
434 431