O
- as Order
type@Entity public class Transaction<O extends Order> extends DomainObject implements Auditable
Constructor and Description |
---|
Transaction() |
Transaction(String id,
O order,
String gatewayId) |
Transaction(String id,
O order,
String gatewayId,
String gatewayTransactionId,
boolean success) |
Modifier and Type | Method and Description |
---|---|
String |
getActualDateTime()
Date time the transaction was conducted
The String format is used to preserve in format as sent by gateway
|
TransactionAmount |
getAmount()
Transaction amount
We want to maintain the details @ the transaction level in addition to Order because Orders may be modified.We can tract at the point in time, what was the exact amount transacted. |
Date |
getDateTime()
When the system got the response and recorded it
Should be set as soon as the Transaction flow returns control to the API that called the transaction and gets the Response Code. |
String |
getFailureGatewayResponse()
Specific reason for gateway Failure
|
String |
getFailureIssuerResponse()
Specific reason for issuer Failure
|
TransactionAmount |
getFee()
An optional transaction fee
|
String |
getGatewayId()
Identify the Gateway / Broker
|
String |
getGatewayRequestParams()
When being redirected to gateway/Service; capture the URL param details
|
String |
getGatewayResponseJSON()
Capture any other flags and attributes from the gateway in a JSON String
|
String |
getGatewayResultCode()
A response/Result mnemonic from the gateway indicating the final result of the Transaction
|
String |
getGatewayTransactionId()
A unique transaction Id generated by the gateway
This maybe the same as id . |
String |
getId()
Transaction Id : Typically generated as a combination of
|
String |
getIssuerResultCode()
A response/Result mnemonic from the Issuer indicating the final result of the Transaction
|
String |
getIssuerTransactionId()
If multiple parties are involved, then the gateway maybe an intermediate party.
|
O |
getOrder() |
String |
getResultDesc()
Result Description if any provided by the gateway to supplement the
#resultCode |
Boolean |
getSuccess()
Was the transaction successful or Not
Note: A Transaction may have two aspects. |
String |
getType()
Transaction type details/code
|
void |
setActualDateTime(String actualDateTime)
Date time the transaction was conducted
The String format is used to preserve in format as sent by gateway
|
void |
setAmount(TransactionAmount amount)
Transaction amount
We want to maintain the details @ the transaction level in addition to Order because Orders may be modified.We can tract at the point in time, what was the exact amount transacted. |
void |
setDateTime(Date dateTime)
When the system got the response and recorded it
Should be set as soon as the Transaction flow returns control to the API that called the transaction and gets the Response Code. |
void |
setFailureGatewayResponse(String failureGatewayResponse)
Specific reason for gateway Failure
|
void |
setFailureIssuerResponse(String failureIssuerResponse)
Specific reason for issuer Failure
|
void |
setFee(TransactionAmount fee)
An optional transaction fee
|
void |
setGatewayId(String gatewayId)
Identify the Gateway / Broker
|
void |
setGatewayRequestParams(String gatewayRequestParams)
When being redirected to gateway/Service; capture the URL param details
|
void |
setGatewayResponseJSON(String gatewayResponseJSON)
Capture any other flags and attributes from the gateway in a JSON String
|
void |
setGatewayResultCode(String gatewayResultCode)
A response/Result mnemonic from the gateway indicating the final result of the Transaction
|
void |
setGatewayTransactionId(String gatewayTransactionId)
A unique transaction Id generated by the gateway
This maybe the same as id . |
void |
setId(String id)
Transaction Id : Typically generated as a combination of
|
void |
setIssuerResultCode(String issuerResultCode)
A response/Result mnemonic from the Issuer indicating the final result of the Transaction
|
void |
setIssuerTransactionId(String issuerTransactionId)
If multiple parties are involved, then the gateway maybe an intermediate party.
|
void |
setOrder(O order) |
void |
setResultDesc(String resultDesc)
Result Description if any provided by the gateway to supplement the
#resultCode |
void |
setSuccess(Boolean success)
Was the transaction successful or Not
Note: A Transaction may have two aspects. |
void |
setType(String type)
Transaction type details/code
|
String |
toString() |
public static final String TIME_ZONE
public Transaction()
public Transaction(String id, O order, String gatewayId, String gatewayTransactionId, boolean success)
id
- as unique transaction Idorder
- as Order
typegatewayTxnId
- as StringgatewayTransactionId
- as String (unique id provided by the gateway)success
- as booleanpublic String getId()
public void setId(String id)
public String getGatewayTransactionId()
id
. The subtle difference is that this is generated by the gateway and the id
is assigned by the calling
API.public void setGatewayTransactionId(String gatewayTransactionId)
id
. The subtle difference is that this is generated by the gateway and the id
is assigned by the calling
API.public String getIssuerTransactionId()
public void setIssuerTransactionId(String issuerTransactionId)
public O getOrder()
public void setOrder(O order)
public String getGatewayResultCode()
public void setGatewayResultCode(String gatewayResultCode)
public String getIssuerResultCode()
public void setIssuerResultCode(String issuerResultCode)
public String getResultDesc()
#resultCode
public void setResultDesc(String resultDesc)
#resultCode
public String getFailureGatewayResponse()
public void setFailureGatewayResponse(String failureGatewayResponse)
public String getFailureIssuerResponse()
public void setFailureIssuerResponse(String failureIssuerResponse)
public String getActualDateTime()
public void setActualDateTime(String actualDateTime)
public Date getDateTime()
public void setDateTime(Date dateTime)
public String getType()
public void setType(String type)
public String getGatewayResponseJSON()
public void setGatewayResponseJSON(String gatewayResponseJSON)
public String getGatewayId()
public void setGatewayId(String gatewayId)
public String getGatewayRequestParams()
public void setGatewayRequestParams(String gatewayRequestParams)
public Boolean getSuccess()
success
is set true ONLY when the response is successful.public void setSuccess(Boolean success)
success
is set true ONLY when the response is successful.public TransactionAmount getAmount()
Order
because Orders may be modified.public void setAmount(TransactionAmount amount)
Order
because Orders may be modified.public TransactionAmount getFee()
public void setFee(TransactionAmount fee)
Copyright © 2018. All rights reserved.