Check if paypal email address is a verified user

后端 未结 1 2001
独厮守ぢ
独厮守ぢ 2021-02-08 05:18

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 paymen

相关标签:
1条回答
  • 2021-02-08 06:00

    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.

    0 讨论(0)
提交回复
热议问题