php - Paypal NVP Authentication Failure -


currently using php + curl test nvp setexpresscheckout paypal feature (sandbox mode) on xampp, no matter do, receive following error:

error code 10002 : authentication/authorization failed. not have permission make api call.

$nvp = array(     'method' => 'setexpresscheckout',     'version' => '98',     'user' => $user,     'pwd' => $pwd,     'signature' => $signature,     'returnurl' => $returnurl,     'cancelurl' => $cancelurl,     'paymentrequest_0_paymentaction' => 'sale',     'paymentrequest_0_amt' => '20.00',     'paymentrequest_0_currencycode' => $currency,     'reqconfirmshipping' => '0',     'noshipping' => '1',     'allownote' => '0',     'localecode' => 'us'     'l_paymentrequest_0_name0' = 'a product name';     'l_paymentrequest_0_amt0' = '20.00';     'l_paymentrequest_0_qty0' = '1';     'l_paymentrequest_0_itemcategory0' = 'digital'; );  $request = 'https://api-3t.sandbox.paypal.com/nvp?' . http_build_query($nvp); $curl = curl_init();  curl_setopt($curl, curlopt_url, $request); curl_setopt($curl, curlopt_verbose, true); curl_setopt($curl, curlopt_ssl_verifyhost, false); curl_setopt($curl, curlopt_ssl_verifypeer, false); curl_setopt($curl, curlopt_returntransfer, true);  $response = urldecode(curl_exec($curl));  curl_close($curl); 

the weird thing if type curl request(the same $request variable) in browser success , token endpoint, don't know if has curl or if it's else, tried disable firewall error persists...

your array malformed.

'l_paymentrequest_0_name0' = 'a product name'; 

that's way start debugging


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -