检查贝宝电子邮件地址是否是经过验证的用户 [英] Check if paypal email address is a verified user

查看:35
本文介绍了检查贝宝电子邮件地址是否是经过验证的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检查试图从我的网站购买商品的 Paypal 用户在购买前是否拥有经过验证的帐户.

I would like to check if a paypal user who tries to buy something from my site has a verified account before he makes purchase.

一旦用户未经验证,他/她进行的任何付款都会失败.资金将自动返还给用户.

Once the user isn't verified, any payment he/she makes would fail. Funds will be returned back to user automatically.

由于欺诈问题,我可以添加或编辑任何代码以使其工作.

Is there any code I can add or edit to make this work due to fraud issues.

我找到了这个

https://www.paypal.com/us/verified/pal=emailhere

如果我用任何电子邮件替换电子邮件此处,我会得到验证或未验证.

where if i replace emailhere with any email i get verified or unverified.

我想将此添加到代码中.谢谢

I would like to add this to the code. Thanks

推荐答案

如果您还没有,我建议您使用 Express Checkout API.这将允许您在完成付款之前检查付款人状态.

If you're not already, I would recommend using the Express Checkout API. This will allow you to check the payer status prior to finalizing the payment.

SetExpressCheckout API 将生成用于将用户重定向到 PayPal 的令牌.然后他们会登录,查看订单,然后点击继续",这会将他们送回您的网站.

The SetExpressCheckout API would generate your token that you use to redirect the user to PayPal with. They would then sign in, review the order, and click continue which would send them back to your site.

此时,您可以调用 GetExpressCheckoutDetails 获取所有买家详细信息,包括他们的验证状态.

At that point, you can call GetExpressCheckoutDetails to obtain all the buyer details including their verified status.

要完成整个事情,您可以调用 DoExpressCheckoutPayment.但是,在付款人未经验证的情况下,您可以简单地停止流程并忽略此调用.不会发生任何付款,因此无需退款.您只需显示一条消息,要求他们在向您购买商品之前验证其帐户.

To finalize the whole thing you would call DoExpressCheckoutPayment. In cases where the payer is not verified, though, you could simply stop the flow and leave this call out. No payment will have taken place so no refund would be necessary. You can simply display a message that they need to verify their account prior to making purchases from you.

如果您碰巧使用 PHP,我建议您查看我的 PayPal 类库.它使所有这一切对您来说都非常简单.

If you happen to be working with PHP I would recommend taking a look at my class library for PayPal. It makes all of this very simple for you.

这篇关于检查贝宝电子邮件地址是否是经过验证的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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