Check if paypal email address is a verified user

亡梦爱人 提交于 2019-12-03 16:58:10

问题


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.

Well I found this

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


回答1:


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.

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.

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

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.

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.



来源:https://stackoverflow.com/questions/13785537/check-if-paypal-email-address-is-a-verified-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!