PayPal:客户继续付款,点击付款并返回成功页面,但未收费 [英] PayPal: Client proceed to payment, clicked pay and got back to success page, but was not charged

查看:76
本文介绍了PayPal:客户继续付款,点击付款并返回成功页面,但未收费的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上使用 paypal 支付按钮,在某些情况下,用户点击它,重定向到 PayPal,登录,点击支付按钮并重定向到成功页面,但客户帐户没有收费,paypal 收费没有呼叫通知 URL.基本上没有交易.

I am using paypal pay button on my website, and in some cases user clicks it, redirected to the PayPal, signs in, clicks on pay button and redirected to the success page, but client account does not get charged and paypal does no call notify URL. Basically there were no transaction.

这是用户重定向到的 URL:

Here is the URL that user is redirected to:

https://www.paypal.com/cgi-bin/webscr?processPayment=1
&cmd=_xclick
&currency_code=USD
&no_shipping=1
&cancel_return=https://www.domain.com/cancel.php
&return=https://www.domain.com/return.php
&notify_url=https://www.domain.com/notify_url.php
&business=payments@domain.com
&receiver_email=payments@domain.com
&item_number=1
&item_name=Application+Payment
&amount=16.00
&quantity=1
&src=1
&sra=1

在大多数情况下,它是具有以下标头的移动设备:Mozilla/5.0(Linux;Android 6.0;VS990 Build/MRA58K)AppleWebKit/537.36(KHTML,如 Gecko)Chrome/48.0.2564.95 Mobile Safari/537.36

In most cases it is Mobile device with following headers: Mozilla/5.0 (Linux; Android 6.0; VS990 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.95 Mobile Safari/537.36

Mozilla/5.0 (Linux; Android 6.0.1; SM-G935V Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/50.0.2661.86 Mobile Safari/537.36 [FB_IAB/FB4A;/78.0.0.16.67;]

Mozilla/5.0 (Linux; Android 6.0.1; SM-G935V Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/50.0.2661.86 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/78.0.0.16.67;]

一年来一切正常,两天前开始出现这种情况,影响了大约 10% 的用户.

Everything worked fine for a year, and that started to happen 2 days ago, and effects about 10% of the users.

推荐答案

在成功页面上提供实际产品之前,您实际上需要仔细检查交易.

You actually need to double-check the transaction before offering the actual product on the success page.

您可以为此使用 PDT:https://developer.paypal.com/docs/classic/products/payment-data-transfer/ .它允许网站在将数字商品和下载内容提供给客户之前立即验证它们是否已真正全额支付.

You can use PDT for this: https://developer.paypal.com/docs/classic/products/payment-data-transfer/ . It allows the website to instantly verify that digital goods and downloads are actually fully paid for, before offering them to the customer.

因此,当用户到达您的成功页面时,您只需在同一页面内进行 PDT 调用并验证交易:

So when user reaches your success page, you simply make a PDT call within the same page and verify the transaction:

  • 如果付款成功,您就可以放心地给他们好东西
  • 如果付款失败,您会向他们显示错误,让他们知道付款实际上并未通过.

Paypal 实际上建议 IPN 和 PDT 都应该用于获得最佳结果,因为它们具有不同的目的并完成相同的目标.在这里阅读:https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNPDTAnAlternativetoIPN/.在底部,它说如果您的网站必须立即收到付款通知,您可以同时实施 IPN 和 PDT."

Paypal actually suggests that both IPN and PDT should be used for best results, as they have different purposes and complete the same goal. Read here: https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNPDTAnAlternativetoIPN/ . At the bottom, it says "If your site must be notified of payments immediately, you can implement both IPN and PDT."

您的情况并不新鲜.我以前听说过类似的案例.原因可能会有所不同,只有 Paypal 才能给出实际原因的答案.

Your situation is not new. I've heard of similar cases in the past. Reasons might vary, and only Paypal could give the answer for the actual reason.

另外:如果您不想更改您的成功页面,请使用中间重定向器页面来验证它请稍候,验证您的交易..."同时进行 PDT 调用.如果 PDT 返回成功,则将它们重定向到最终的成功页面.如果没有,请向他们展示错误.

Also: If you don't want to change your success page, use an intermediate redirector page that verifies it "please wait, verifying your transaction..." while making the PDT call. If PDT returns success, then redirect them to the final success page. If not, show them the error.

这篇关于PayPal:客户继续付款,点击付款并返回成功页面,但未收费的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆