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 706ba24 commit 241fe56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pc.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,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 241fe56

Please sign in to comment.