Curl 我无法使用neteller API
{“错误”:{“代码”:“20005”,“消息”:“重复事务引用”}Curl 我无法使用neteller API,curl,cakephp-2.0,Curl,Cakephp 2.0,{“错误”:{“代码”:“20005”,“消息”:“重复事务引用”} 我总是收到类似20005的错误。该错误意味着您已经使用此“merchantRefId”创建了一个事务 “merchantRefId”字段应包含您进行的每笔交易的唯一值 $accessToken = $this->_netellerAccess(); $data_string = '{ "paymentMethod": {
我总是收到类似20005的错误。该错误意味着您已经使用此“merchantRefId”创建了一个事务 “merchantRefId”字段应包含您进行的每笔交易的唯一值
$accessToken = $this->_netellerAccess();
$data_string = '{
"paymentMethod": {
"type": "neteller",
"value": "ashutosh12@avainfotech.com"
},
"transaction": {
"merchantRefId": "26434256",
"amount": 10,
"currency": "USD"
},
"verificationCode": "234124"
}';
$token=$accessToken['accessToken'];
$ch = curl_init('https://api.neteller.com/v1/transferOut');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
"Authorization: Bearer $token"
)
);
echo $result = curl_exec($ch);
只需将其更改为另一个随机值
"merchantRefId": "26434256"