Validate Paypal Live Account

Happy Coding

I am validating the email address using the following code :

$url = trim("https://svcs.sandbox.paypal.com/AdaptiveAccounts/GetVerifiedStatus");         

$API_UserName = ""; 
$API_Password = ""; 
$API_Signature = "";
$API_AppID = "";                                       
$API_RequestFormat = "NV";
$API_ResponseFormat = "NV";

//Create request payload 
$bodyparams = array (   "requestEnvelope.errorLanguage" => "en_US",
                        "emailAddress" => $email, // email to be validate
                        "matchCriteria" => "NONE"
                    );

// convert payload array into url encoded query string
$body_data = http_build_query($bodyparams, "", chr(38));

//create request and add headers
$params = array("http" => array( 
                            "method" => "POST",
                            "content" => $body_data,
                            "header" => "X-PAYPAL-SECURITY-USERID:     " . $API_UserName . "\r\n" .
                                        "X-PAYPAL-SECURITY-SIGNATURE:  " . $API_Signature . "\r\n" .
                                        "X-PAYPAL-SECURITY-PASSWORD:   " . $API_Password . "\r\n" .
                                        "X-PAYPAL-APPLICATION-ID:      " . $API_AppID . "\r\n" .
                                        "X-PAYPAL-REQUEST-DATA-FORMAT: " . $API_RequestFormat . "\r\n" .
                                        "X-PAYPAL-RESPONSE-DATA-FORMAT:" . $API_ResponseFormat . "\r\n" 
                   ));


$ctx = stream_context_create($params);  //create stream context
$fp = @fopen($url, "r", false, $ctx);   //open the stream and send request
$response = stream_get_contents($fp);   //get response

//check to see if stream is open
if ($response === false) 
{
throw new Exception("php error message = " . "$php_errormsg");
}

fclose($fp);    //close the stream

$keyArray = explode("&", $response);

foreach ($keyArray as $rVal)
{
list($qKey, $qVal) = explode ("=", $rVal);
    $kArray[$qKey] = $qVal;
}

if( $kArray["responseEnvelope.ack"] == "Success") 
{
    // do nothing
}
else 
{
    // error 
}

However this code works for sandbox account. What changes do i make to validate the paypal account. Any help will be appreciated.

Vimalnath

Three Things

P.S Your account should be Business/premier Verified account

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Getting clientID and clientSecret for live paypal account

Paypal DPRP is disable for live account error?

Not login to paypal sandbox account

L_ERRORCODE0 => 11813 - Invalid callback URL. Paypal reccuring payments working on sandbox test account but not in live

Issue in PayPal live transaction if PayPal Balance is $0.00

Paypal - Payouts issue on live paypal envirnment

paypal not offering the option to pay without a paypal account

Paypal Advanced Testing without Paypal Manager account

Setting PayPal PHP Application live

How to transfer amount from paypal account to paypal account?

Issues with Security, Passwords and PayPal Account

Unclaimed status in PayPal Sandbox account

Merchant ID for paypal personal account

Paypal IPN set "no account" as default

Geary doesn't validate account

Rails validate state if account is active

Paypal live payment failed to charge customer

How to move PayPal Checkout to live production?

paypal client authentication failed while going live

Paypal Switching from Sandbox to Live - Swift SDK

NOT_AUTHORIZED error – only in PayPal Live environment

Paypal (India to India) payment error in live mode

PayPal API to get tax detail configured in PayPal account

is PayPal-PHP-SDK supporting to do payment to another paypal account?

PayPal WooCommerce Connect multiple websites with one PayPal account

is I need to purchase Both Paypal and Braintree Account for Paypal Integration?

How to validate a sale with PayPal REST API and IPN

How to validate a PayPal webhook signature for Google Script?

PayPal checkout button - validate order before popup

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  3. 3

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  4. 4

    pump.io port in URL

  5. 5

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  8. 8

    Do Idle Snowflake Connections Use Cloud Services Credits?

  9. 9

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

  10. 10

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  11. 11

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  12. 12

    Generate random UUIDv4 with Elm

  13. 13

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  14. 14

    Is it possible to Redo commits removed by GitHub Desktop's Undo on a Mac?

  15. 15

    flutter: dropdown item programmatically unselect problem

  16. 16

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  17. 17

    EXCEL: Find sum of values in one column with criteria from other column

  18. 18

    Pandas - check if dataframe has negative value in any column

  19. 19

    How to use merge windows unallocated space into Ubuntu using GParted?

  20. 20

    Make a B+ Tree concurrent thread safe

  21. 21

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

HotTag

Archive