11

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

4

1 回答 1

3

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

SetExpressCheckout API 将生成您的令牌,您可以使用该令牌将用户重定向到 PayPal。然后他们将登录,查看订单,然后单击继续,这会将他们发送回您的站点。

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

要完成整个事情,您将调用DoExpressCheckoutPayment。但是,如果付款人未经过验证,您可以简单地停止流程并忽略此呼叫。不会发生任何付款,因此无需退款。您可以简单地显示一条消息,表明他们需要在向您购买之前验证他们的帐户。

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

于 2012-12-09T21:40:32.503 回答