paysafe内部错误ErrorCode1007

时间:2018-08-01 21:45:58

标签: php payment-gateway paysafe

我正在尝试通过php Curl(mycurl)使用PaySafe Rest API,但出现错误。 我的php代码:

$url="https://api.test.paysafe.com/cardpayments/v1/accounts/xxxxxxx/auths";// si erreur ajouter HTTP/1.1
$headers=array('content-type: application/json');
$call_api=new mycurl($url);
$call_api->useAuth(true);
$call_api->setName(" my username");
$call_api->setPass("my password");
$call_api->setHeaders($headers);
$curlopt_postfields=json_encode( array(
    'merchantRefNum' => 'merchant ref',
    'amount' => 10,
    'settleWithAuth'=>true,
    'card' => array(
        'paymentToken' => 'my token key' 
    ),
    'billingDetails' => array(
        'street' => '100 Queen Street West',
        'city' => 'Toronto',
        'state' => 'ON',
        'country' => 'CA',
        'zip' => 'M5H 2N2'
    )
));
$call_api->setPost($curlopt_postfields);
$call_api->setJson();
$call_api->createCurl($url);
//result
$result_api_httpStatus=$call_api->getHttpStatus();
$result_api=$call_api->tostring();
if($result_api_httpStatus==200)
{
    echo 'OK';
}
else {
    //echo $result_api_httpStatus;
    print_r($result_api);
}

此过程的解释here

下面是返回的错误:

{"links":[{"rel":"self","href":"https:\/\/api.test.paysafe.com\/cardpayments\/v1\/accounts\/xxxxxx\/auths\/yyyyyyyyyy"}],"id":"yyyyyyyyyy","merchantRefNum":"merchant number","error":{"code":"1007","message":"Internal Error.","links":[{"rel":"errorinfo","href":"https:\/\/developer.paysafe.com\/en\/rest-api\/cards\/test-and-go-live\/card-errors\/#ErrorCode1007"}]},"settleWithAuth":true}

“消息”:“内部错误”。但我不知道为什么...

我记得我遵循paysafe.js的标记化过程来生成标记,如here

所述

请帮助我

1 个答案:

答案 0 :(得分:0)

已解决,我的帐户存在问题,Paysafe支持对其进行了修复。谢谢