manta.payproc.TXStorage¶
-
class
manta.payproc.
TXStorage
[source]¶ Storage for Active Session Data of Transaction
This is an abstract class to be implemented in subclassing. This is meant to be used with external storage like a database. Payproc will use a memory TXStorage implementation by default, which is not persistent.
Transaction with status ‘PAID’ or ‘INVALID’ must not be present
-
create
(txid, session_id, application, order, ack=None)[source]¶ Create a new transaction
Parameters: - txid (
int
) – txid of Transaction - session_id (
str
) – session_id of Transaction - application (
str
) – application_id of Transaction - order (
MerchantOrderRequestMessage
) – Merchant Order of Transaction - ack (
Optional
[AckMessage
]) – First Ack Message (ie status=NEW)
Returns:
Return type: TransactionState
- txid (
-
get_state_for_session
(session_id)[source]¶ Get state for transaction with session_id
Parameters: session_id ( str
) – session_id of transactionReturns: state of transaction
Return type: TransactionState
-