Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

订单金额从参数里面获取,感觉不专业 #7

Open
ichynul opened this issue May 17, 2018 · 2 comments
Open

订单金额从参数里面获取,感觉不专业 #7

ichynul opened this issue May 17, 2018 · 2 comments

Comments

@ichynul
Copy link

ichynul commented May 17, 2018

// 获取支付金额
$amount='';
if($_SERVER['REQUEST_METHOD']=='POST'){
$amount=$_POST['total'];
}else{
$amount=$_GET['total'];
}

@Yakima-Teng
Copy link

这个接口的使用场景是DCloud项目捐赠,捐赠金额是由用户定的。

@Yakima-Teng
Copy link

不过这个接口有问题,返回的字符串含有"amp;"字符串,客户端直接使用这个接口返回的字符串是无法唤起新版支付宝APP支付的,需要将里面所有的"amp;"都替换掉(删掉,即把"&"替换成"&")。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants