Paypal退款API电话

时间:2016-04-18 10:50:41

标签: php post curl paypal paypal-sandbox

我尝试使用下面提到的代码发布退款API的帖子请求:

<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"api-3t.sandbox.paypal.com/nvp");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 
          http_build_query(array('USER' => 'user','PWD' => '14235', 'SIGNATURE' => '14785' ,'METHODE' => RefundTransaction , VERSION => 94, TRANSACTIONID => 'xxxxxxxxxxxxxxxxx',REFUNDTYPE => Full)));

// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$server_output = curl_exec ($ch);

curl_close ($ch);

// further processing ....
if ($server_output == "OK") { } else {  }

echo $server_output;

?>

但它说

服务器连接已关闭

描述:请求的服务器在事务完成之前关闭了连接。

0 个答案:

没有答案