Please suggest how to validate an email account for paypal
, whether a transaction account in paypal is exists or not before transaction.
In adaptive payment , we can pay through payapl email ids.. Little bit confuse if valid email not found.
Please suggest how to validate an email account for paypal
, whether a transaction account in paypal is exists or not before transaction.
In adaptive payment , we can pay through payapl email ids.. Little bit confuse if valid email not found.
You don't need to validate the email address. PayPal sends the payment instructions to the email address you specify in Adaptive Payments. If the email address is NOT associated with a PayPal account, PayPal prompts them to setup an account to claim the amount.
Look at the following statement in the Adaptive Payments API documentation
"Make payments to almost anyone with an email address or mobile phone number, with or without a PayPal account. Recipients who don't have a PayPal account can create one in minutes."
If you still think you want to validate the email address, then the following SO question has some tricks: How to validate PayPal account?
I am new to PayPal integration, i am not sure about Adaptive Payment api. But we have a privilege to check whether specific email id having account in PayPal or not using GetVerifiedStatus method.
Please use below sandbox wsdl URL for verifying email
URL : https://svcs.sandbox.paypal.com/AdaptiveAccounts?wsdl
Response will be like below
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ns2:GetVerifiedStatusResponse xmlns:ns2="http://svcs.paypal.com/types/aa">
<responseEnvelope>
<timestamp>2015-07-20T23:42:46.661-07:00</timestamp>
<ack>Success</ack>
<correlationId>5cea9a8575ab9</correlationId>
<build>17345626</build>
</responseEnvelope>
<accountStatus>UNVERIFIED</accountStatus>
<countryCode>IN</countryCode>
<userInfo>
<emailAddress>X@X.com</emailAddress>
<accountType>PERSONAL</accountType>
<accountId>X</accountId>
<name>
<salutation/>
<firstName>X</firstName>
<middleName/>
<lastName>X</lastName>
<suffix/>
</name>
<businessName/>
</userInfo>
</ns2:GetVerifiedStatusResponse>
</soapenv:Body>
</soapenv:Envelope>
Note: while creating stub don't forgot to set endpoint as below.
String endpointURL = "https://svcs.sandbox.paypal.com/AdaptiveAccounts/GetVerifiedStatus";
You validate it by using filter_var($email, FILTER_VALIDATE_EMAIL)
this will return a boolean of true of false depending on if the email is valid or is not. But thats to see if the email entered is an "Email"
$email = "email@example.com";
if(filter_var($email, FILTER_VALIDATE_EMAIL) {
// Yes it is valid
}else {
// No it is not valid
}
For PayPal account validation please check Check if paypal email address is a verified user
Have fun! Hope that helped..