Tim-Api REVERSAL 函数

Tim-Api REVERSAL Function

我想用 tim-api 处理退款。 但在退款请求后,我收到“未知参考号”的错误。

我找不到要作为参考编号发送的参数。

我该如何解决这个问题?

terminal.transactionAsync(TransactionType.REVERSAL, new Amount(10.0, Currency.EUR));

输出:

SIXML_UNKNOWN_REFERENCE_NUMBER

Tim-Api

String trxRefNum = "Your last transaction Ref Number";

TransactionRequest transactionRequest = new TransactionRequest();
TransactionData transactionData = new TransactionData();

transactionData.setSixTrxRefNum(trxRefNum);
transactionRequest.setTransactionData(transactionData);
try {
     SixUtils.terminal.transaction(TransactionType.REVERSAL, transactionRequest);
    } catch (TimException e) {
      e.printStackTrace();
    }