php - PayPal RefundTransaction API (NVP) Issue -
php - PayPal RefundTransaction API (NVP) Issue -
i'm trying refundtransaction api nvp [method] => refundtransaction
mutual response fields returning response paypal refundtransaction api operation (nvp) here request
array ( [method] => refundtransaction [version] => 54.0 [user] => abc***xyz.com [pwd] => asd******asd [signature] => t535*****************************************qwe3 [currencycode] => aud [transactionid] => 1d4*******40913kkj )
here respose i'm getting.
array ( [timestamp] => 2014-11-11t11:40:57z [correlationid] => 3dba******fce [ack] => success [version] => 54.0 [build] => 13***072 )
the thing i'm getting response success, mutual fields there. please help
this how function looks
private function nvpcall($transaction_id){ $params['transactionid'] = $transaction_id; $params['refundtype'] = 'full'; $nvparr = $params ; $nvpreq = array(); $nvpreq['method'] = urlencode($methodname); $nvpreq['version'] = urlencode('54.0'); $nvpreq['user'] = urlencode($this->pp_pro_username); $nvpreq['pwd'] = urlencode($this->pp_pro_password); $nvpreq['signature'] = urlencode($this->pp_pro_signature); $nvpreq['currencycode'] = urlencode('aud'); $nvpreq = array_merge($nvpreq, $nvparr); $strreq = ''; foreach($nvpreq $key => $val){ if($strreq!='') { $strreq.= '&'; } $strreq.= $key.'='.urlencode($val); } $ch = curl_init(); curl_setopt($ch, curlopt_url, $this->api_endpoint); curl_setopt($ch, curlopt_verbose, 1); curl_setopt($ch, curlopt_header, 0); curl_setopt($ch, curlopt_ssl_verifypeer, false); curl_setopt($ch, curlopt_ssl_verifyhost, false); curl_setopt($ch, curlopt_returntransfer,1); curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_postfields, $strreq); $response = curl_exec($ch); curl_close($ch); print_r($this->deformatnvp($response)); }
added notes
now found out wasn't problem code, working username,password , signature in sandbox business relationship though! might problem?
php curl paypal
Comments
Post a Comment