Skip to content

Commit

Permalink
手机网站支付
Browse files Browse the repository at this point in the history
兼容php7.2
  • Loading branch information
dedemao authored Mar 25, 2019
1 parent 806c866 commit 706ba24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wap.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ public function doPay()
*/
protected function buildRequestForm($para_temp) {
$sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='https://openapi.alipay.com/gateway.do?charset=".$this->charset."' method='POST'>";
while (list ($key, $val) = each ($para_temp)) {
foreach($para_temp as $key=>$val){
if (false === $this->checkEmpty($val)) {
$val = str_replace("'","&apos;",$val);
$sHtml.= "<input type='hidden' name='".$key."' value='".$val."'/>";
}
}
}
}
//submit按钮控件请不要含有name属性
$sHtml = $sHtml."<input type='submit' value='ok' style='display:none;''></form>";
$sHtml = $sHtml."<script>document.forms['alipaysubmit'].submit();</script>";
Expand Down

0 comments on commit 706ba24

Please sign in to comment.