Home  >  Article  >  Backend Development  >  支付宝接口传值有关问题

支付宝接口传值有关问题

WBOY
WBOYOriginal
2016-06-13 12:49:18864browse

支付宝接口传值问题
按照demo里面的都已经调试完毕了,但是传值去alipayapi.php有点疑问。
因为alipayapi.php中的值都是从前一个页面得到的,那么如果我手动在前一个页面修改了值的话那么alipayapi.php中接受到的值就会是错误的。

我的写法是这样的

<br />
<input size="30" type="hidden" name="WIDseller_email" value="xxxxxx@163.com" /><br />
                        <input size="30" type="hidden" name="WIDout_trade_no" value="{wa:$order.orderid}" /><br />
                        <input size="30" type="hidden" name="WIDsubject" value="订单{wa:$order.orderid}" /><br />
                        <input size="30" type="hidden" name="WIDtotal_fee" value="{wa:$order.c_price}" /><br />
                        <button class="new-btn-login" type="submit" style="text-align:center;">付款</button><br />


这样明显很不安全,只要手动修改post值,那么错误的值就会在alipayapi.php中执行了。

想问下各位应该怎么传值比较合理?


------解决方案--------------------
不太明白是啥意思 支付宝接口还没看过文档。你可以在 alipayapi.php 过滤提交过来的数据 不符合要求的全部拒绝执行.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn