Notice
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 does not say anything 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 (momentálně hodnoty 5,6 a 7), můžete považovat požadavek za ukončený. V případě stavu COMPLETED (state 5), měli byste začít volat dotaz na podrobnosti transakce, abyste získali výsledek transakce, viz „4.Getting transaction details„
– If isRepeatable == true, then you can repeat the transaction with the same transactionId value, see Step 2: Transaction request
– If isRepeatable == false, then you cannot repeat the transaction with the same transactionId value, see Step 2: Request a transaction, and you must generate a new transactionId, see Step 1: Register a transaction.
Example of a response to a condition:
{„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 was successfully processed, status=8 means that the transaction is in the "error" state, code=43 gives a detailed error why it ended with a task error, according to the documentation here, the value "isRepeatable=false" means that you cannot call TransactionRequestV2 again with the same TransactionID value.
