我无法使用neteller API

时间:2015-02-22 00:06:00

标签: curl cakephp-2.0

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

{“error”:{“code”:“20005”,“message”:“重复的交易参考”}} 我总是得到像20005这样的错误。

1 个答案:

答案 0 :(得分:1)

错误表示您已使用此商家参与创建了一项交易。

' merchantRefId'字段应包含您进行的每笔交易的唯一值。