使用Slimcd请求交易时。我有问题"语法错误,格式错误的JSON"。我通过谷歌搜索没有发现有用的东西。
// Create a ProcessTransaction Request class
$request = new Transact_ProcessTransactionRequest() ;
$request->username = '1032';
$request->password = '289075';
$request->clientid = '1032';
$request->siteid = 228226448 ;
$request->priceid = 74 ;
$request->transtype = 'LOAD';
$request->amount = '0.00';
$request->cardnumber = '4111111111111111';
$request->expmonth = '12';
$request->expyear = '49';
$request->product = 'MyPHP';
$request->ver = '1.0';
$request->key = 'SVD-072-5QQ6-5K58';
$reply = $SlimCD->Transact_ProcessTransaction($request);
print_r(json_encode($reply)) ;
Response:
{"response":"Error","responsecode":"2","description":" - Syntax error, malformed JSON","responseurl":"https:\/\/trans.slimcd.com\/soft\/json\/jsonpayment.asp","datablock":""}