Notification
Transaction status is an important indicator for third-party applications. It tells you what state the transaction is in and whether the transaction can be repeated. It says nothing about the success/failure of the transaction.
Request [transactionId]
The transactionId input value is generated in Step 1 , Transaction Registration.
void stateRequest(String transactionId, IStateResultListener listener) throws RemoteException
Response [StateResultEntity]
States
Once the status you receive is FINISHED (currently values 6,7 and 8), you should start calling the transaction details query to get the result of the transaction, see "4.Getting transaction details"
- If isRepeatable == true, then you can repeat the transaction with the same transactionId value, see Step 2: Request a transaction
- If isRepeatable == false, then you cannot repeat a transaction with the same transactionId value, see Step 2: Request a transaction and you must generate a new transactionId, see Step 1: Register the transaction.
– If the status of the IN_PROGRESS returns, you have to wait for the transaction to complete, i.e. ask again for example in 500 ms.
If the status of the IN_PROGRESS is older than 5 minutes, you can process the transaction as unsuccessful.
Example of a status response:
{„created“:“2023-09-11T12:29:11.300Z“,“error“:{„code“:43,“internalErrorCode“:0,“internalErrorSubCode“:0,“platform“:“TOM_APP“},“isRepeatable“:false,“resultCode“:0,“state“:8,“transactionId“:“d03484bc-509e-11ee-ba37-77691fde9486″,“updated“:“2023-09-11T12:30:34.337Z“}
Explanation: resultCode=0 means that the request has been processed successfully, status=8 means that the transaction is in the "error" state, code=43 gives a detailed error why the task ended with an error according to the documentation here, the value "isRepeatable=false" means that you cannot call TransactionRequestV2 again with the same TransactionID value.