I have called AddressVerify API of PayPal in sandbox mode but it returns with error,
[L_ERRORCODE0] => 10002
[L_SHORTMESSAGE0] => Authentication/Authorization Failed
[L_LONGMESSAGE0] => You do not have permissions to make this API call
[L_SEVERITYCODE0] => Error
My code for AddressVerification is,
function verify_address($PayPalConfig, $email, $street, $zipcode) {
$PayPal = new PayPal($PayPalConfig);
$AVFields = array(
'EMAIL' => $email,
'STREET' => $street,
'ZIP' => $zipcode,
);
$PayPalRequestData = array(
'AVFields' => $AVFields,
);
$PayPalResult = $PayPal->AddressVerify($PayPalRequestData);
return $PayPalResult;
}
I want to know is there any setting to enable this API Call or any other method which will call this api successfully?
Address Verification is normally not enabled with sandbox. So, you will need to open a support request or make phone call to enable that.