简体   繁体   English

Paypal IPN已验证。 如果我需要重新找回怎么办?

[英]Paypal IPN verified. What to do if I need to refound?

I'm selling from my php site and I accept paypal payments, I've got a limited number of products, buyers have them in their carts, and availability is not enough for them all. 我从我的php网站上出售商品,我接受贝宝付款,产品数量有限,买家将其放在购物车中,而可用性不足以供所有人使用。 If they pay with paypal at the same time I need to refound one of them. 如果他们同时使用Paypal付款,我需要重新找到其中之一。 Is this approach correct, or is it preferable to check availability before the payment IPN notification? 这种方法是否正确,还是最好在付款IPN通知之前检查可用性?

That sounds like a poor user flow. 听起来用户流很差。 Once you get verification that an item is sold, reduce your inventory in your database. 确认已售出某物品后,减少数据库中的库存。 Before sending them to Paypal, verify that you have enough inventory to fulfill their order. 在将它们发送到Paypal之前,请确认您有足够的库存来履行他们的订单。

If you get a scenario where say you have one item left and two users were directed to Paypal to purchase it, whoever you receive notification of successful payment first, gets it. 如果您遇到这样的情况,说您只剩一件商品,并且有两个用户被定向到Paypal进行购买,那么无论您谁首先收到成功付款的通知,都可以得到它。 The other, you can do a few things: 另外,您可以做一些事情:

  1. Place the item on backorder, let the user know when it'll come in with an estimate. 将该商品放到未交货的位置,让用户知道何时将其带入估算。 When it comes in, send it to them. 进来时,将其发送给他们。
  2. Allow the user to choose whether they want the backorder, or to cancel their order, in which case they get a refund 允许用户选择是否要补货,或取消订单,在这种情况下,他们可以获得退款
  3. If, once a product sells out, there are none left forever, you can immediately issue a refund. 如果产品一经售罄,便永远没有剩余,您可以立即退款。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM