PayPal RefundTransaction API(NVP)问题

时间:2014-11-11 12:03:19

标签: php curl paypal

我正在尝试使用nvp作为[METHOD] => RefundTransaction的RefundTransaction API 仅返回作为对PayPal RefundTransaction API操作(NVP)的响应的公共响应字段 这是请求

Array
(
    [METHOD] => RefundTransaction
    [VERSION] => 54.0
    [USER] => abc***xyz.com
    [PWD] => asd******asd
    [SIGNATURE] => T535*****************************************qWE3
    [CURRENCYCODE] => AUD
    [TRANSACTIONID] => 1D4*******40913KKJ
)

这是我得到的休息。

Array
(
    [TIMESTAMP] => 2014-11-11T11:40:57Z
    [CORRELATIONID] => 3dba******fce
    [ACK] => Success
    [VERSION] => 54.0
    [BUILD] => 13***072
)

问题是我得到的回应是成功,但只有常见的领域。请帮忙

这就是我的功能的样子

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 as $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));     

        }

添加了备注

现在我发现这不是代码的问题,但它正在使用沙盒帐户中的另一个用户名,密码和签名!那可能是什么问题?

0 个答案:

没有答案