【发布时间】:2020-11-09 20:53:12
【问题描述】:
我正在使用 PayPal Checkout 在客户端进行基本付款,我在询问它是否安全,因为我不希望用户更改金额。
此代码与文档中给出的相同。
<script>
paypal.Buttons({
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
value: '100'
}
}]
});
}
}).render('#paypal-button-container');
</script>
【问题讨论】:
-
是的,他们绝对可以。代码在他们的机器上执行。他们可以完全控制它。
-
谢谢,@Ivar。抱歉,我知道这个问题很愚蠢
-
别担心。你绝对不是第一个犯这个错误的人。永远不能盲目信任来自客户端的数据。把它放在脑后可以为你节省很多伤害。 :)
标签: javascript paypal paypal-sandbox