PayPal Express Checkout API - 用户未确认金额?
我正在为 Web 应用程序实现 Express Checkout API,一切正常。尽管如此,我对手术的流程仍存有疑问。
如果我理解得很好,用户体验如下:
- 用户在商家网站上订购一些商品
- 在付款之前,用户被发送到 PayPal 网站
- 经过身份验证后,用户可以确认有关交易的一些详细信息,例如发货订单,但不是总金额
- 用户被重定向到商家网站,在那里他可以确认其他信息,特别是订单总金额
- 付款完成,用户从商人。
SetExpressCheckout
调用发生在 1 和 2 之间,GetExpressCheckoutDetails
发生在 3 和 4 之间,最后 DoExpressCheckoutPayment
发生在 4 和 5 之间
。在步骤3中没有机会确认总金额是因为此时商家可能没有有关运费的信息。事实上,文档明确指出 在调用 SetExpressCheckout
和调用 DoExpressCheckoutPayment
之间,金额可能会发生变化。
那么,如果商家对用户撒谎怎么办?我可能会说您确认支付 20 欧元,并向您收取 2000 欧元。现在,这是一种欺诈,我可能会被起诉,但无论如何都不应该允许。
请注意,该文档还声明 通过调用 GetExpressCheckoutDetails
获取有关交易的详细信息是可选的。同样,用户查看付款详细信息的步骤 4 可以完全跳过,在这种情况下,用户将不会确认任何金额!
我是不是搞错了,或者这个工作背后有什么理由吗?
I am implementing the Express Checkout API for a web application, and everything works fine. Still, I am left with a doubt about the flow of the operation.
If I understand well, the user experience is as follows:
- User orders some items on the merchant sites
- Before paying, the user is sent to the PayPal site
- After authentication, the user can confirm some details about the transaction, such as the shipping order, but NOT the total amount
- The user is redirected to the merchant site, where he can confirm other information, and in particular the total amount of the order
- The payment is done and the user gets a confirmation page from the merchant.
The SetExpressCheckout
call happens between 1 and 2, GetExpressCheckoutDetails
between 3 and 4, and finally DoExpressCheckoutPayment
between 4 and 5.
The fact that the user is not given the opportunity to confirm the total amount in step 3 is because at this point the merchant may not have the information about the shipping cost. Indeed the documentation says explicitly that the amount can change between the call to SetExpressCheckout
and the one to DoExpressCheckoutPayment
.
So, what if the merchant lies to the user? I may say that you are confirming a payment for 20EUR and charge you 2000EUR. Now, that is a fraud and I may be prosecuted, but it should not be allowed anyway.
Note that the documentation also claims that obtaining the details about the transaction with a call to GetExpressCheckoutDetails
is optional. Similarly, step 4, where the user reviews the payment details, may be skipped altogether, and in this case the user will not confirm any amount!
Am I getting something wrong, or is there a rationale behind this working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
PayPal 无法知道您在步骤 4 中向用户显示的内容。解决此问题的唯一方法是 PayPal 消除商家根据客户地址确定税费和运费的能力(或要求 这种事情在PayPal付款流程中更新它)。
有时商家不需要第 4 步,因此没有必要强迫他们显示与第 3 步中在 PayPal 上看到的相同信息的屏幕。甚至有 an选项,更改第 3 步中的 PayPal 屏幕,以反映不会有第 4 步屏幕。
当然,如果商家要更改步骤 3 中显示的税费或运费值,那么他们不应该使用此功能。
There is no way that PayPal can tell what you are displaying to the user in step 4. The only way around it would be for PayPal to eliminate the ability for the merchant to determine tax and shipping based on the customer's address (or require this sort of thing to update it during the PayPal payment flow).
Sometimes a merchant has no need for step 4, so there is no point in forcing them to display a screen with the same information they just saw on PayPal in step 3. There is even an option that changes the PayPal screen in step 3 to reflect that there will be no step 4 screen.
Of course, if a merchant is changing the tax or shipping values from what was displayed on step 3 then they shouldn't be using this feature.
文档 |贝宝开发者
Documentation | PayPal Developer