简体   繁体   中英

How do I check a persons email address to make sure they have a paypal account?

I'm trying to advance my programming skills and as such I'm trying to create a website which integrates with paypal. I've established that I need to be using chained payments through the adaptive payments API.

But before I go about receiving and sending payments I want to make sure that any new user signing up to my website already has a paypal account. IE when they sign up to my website I'd like to first of all check that the email address they supplied me with is already linked to a valid paypal account.

I've never had to do this before so if someone could explain in very simple language how I might go about doing this I'd be really grateful.

I'm using the cakephp framework incase that makes any difference to the answer.

thanks

This may be what you're looking for: AddressVerify API

Confirms whether a postal address and postal code match those of the specified PayPal account holder.

After supplying an email address, PayPal will return with one of 3 responses for the email parameter: None , Confirmed , or Unconfirmed . If it is None , then the request value does not match any email address on file at PayPal.

Although this API requires both the email address and shipping/billing information, it can be solely used to verify the email address. By supplying invalid shipping/billing information, the API will still respond with whether the email matches any on file at PayPal , and also match whether your invalid shipping/billing information matches the information on file with the matched email address.

An expected PayPal response may reflect the above:

Array
(
    [CONFIRMATIONCODE] => Confirmed
    [STREETMATCH] => Unconfirmed
    [ZIPMATCH] => Unconfirmed
    [COUNTRYCODE] => US
    [TOKEN] => a134k1j34lk134gv13dshjg52b
)

CONFIRMATIONCODE will be your only concern when verifying a PayPal email address.

Please, check the above link for more information.

Setting up an IPN Listener is one way that's often used to verify most of the important information you're referring to. There's a decent tutorial that you can check out since paypal's example might not be enough on it's own.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM