【发布时间】:2018-02-12 00:29:26
【问题描述】:
我正在查看 PayPal 交互式集成演示 link。
在用户完成支付流程后的某个时刻,客户端到达代码:
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions) {
// Make a call to the REST api to execute the payment
return actions.payment.execute().then(function() {
window.alert('Payment Complete!');
});
}
在实际场景中,我可能希望向服务器发送发送产品或更新用户计划的指令,而不是警报。它可能会通过 HTTP POST 请求来完成。
服务器如何知道确实付款并且不是黑客手动发送 http post 请求的结果?
【问题讨论】:
标签: paypal client-server payment-gateway payment client-side