Class PaymentTransactionImpl
java.lang.Object
org.broadleafcommerce.core.payment.domain.PaymentTransactionImpl
- All Implemented Interfaces:
Serializable,org.broadleafcommerce.common.copy.MultiTenantCloneable<PaymentTransaction>,org.broadleafcommerce.common.domain.AdditionalFields,org.broadleafcommerce.common.persistence.Status,PaymentTransaction
- Author:
- Jerry Ocanas (jocanas)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigDecimalprotected org.broadleafcommerce.common.persistence.ArchiveStatusprotected Stringprotected Dateprotected Longprotected OrderPaymentprotected PaymentTransactionNecessary for operations on a payment that require something to have happened beforehand.protected Stringprotected Booleanprotected Booleanprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends PaymentTransaction>
org.broadleafcommerce.common.copy.CreateResponse<G>createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) org.broadleafcommerce.common.money.MoneyGets the amount that this transaction is forGets theCustomerIP address that instigated this transaction.getDate()Gets the date that this transaction was made ongetId()The overall payment that this transaction applies to.Transactions can have a parent-child relationship for modifying transactions that can occur.Gets the string-representation of the serialized response from the gateway.Gets whether or not this transaction was successful.org.broadleafcommerce.common.payment.PaymentTransactionTypegetType()The type ofbooleanisActive()booleanIndicates whether or not this transaction on the Order Payment contains a payment token (i.e.voidsetAdditionalFields(Map<String, String> additionalFields) voidsetAmount(org.broadleafcommerce.common.money.Money amount) Sets the amount of this transactionvoidsetArchived(Character archived) voidsetCustomerIpAddress(String customerIpAddress) Sets theCustomerIP address that instigated the transaction.voidSets the date that this transaction was made onvoidvoidsetOrderPayment(OrderPayment orderPayment) Sets the overall payment that this transaction applies tovoidsetParentTransaction(PaymentTransaction parentTransaction) voidsetRawResponse(String rawResponse) Sets the raw response that was returned from the gateway.voidsetSaveToken(boolean saveToken) Mark this transaction as containing (or going to contain) a token that should be saved on the user's profile as aCustomerPaymentvoidsetSuccess(Boolean success) voidsetType(org.broadleafcommerce.common.payment.PaymentTransactionType type)
-
Field Details
-
id
-
type
-
amount
-
date
-
customerIpAddress
-
rawResponse
-
success
-
archiveStatus
protected org.broadleafcommerce.common.persistence.ArchiveStatus archiveStatus -
orderPayment
-
parentTransaction
Necessary for operations on a payment that require something to have happened beforehand. For instance, an AUTHORIZE would not have a parent but a CAPTURE must have an AUTHORIZE parent and a REFUND must have a CAPTURE parent -
additionalFields
-
saveToken
-
-
Constructor Details
-
PaymentTransactionImpl
public PaymentTransactionImpl()
-
-
Method Details
-
getId
- Specified by:
getIdin interfacePaymentTransaction
-
setId
- Specified by:
setIdin interfacePaymentTransaction
-
getOrderPayment
Description copied from interface:PaymentTransactionThe overall payment that this transaction applies to. Note that if the relationship to an order payment is unset on this particular transaction, then this will automatically attempt to obtain theOrderPaymentfromPaymentTransaction.getParentTransaction().- Specified by:
getOrderPaymentin interfacePaymentTransaction
-
setOrderPayment
Description copied from interface:PaymentTransactionSets the overall payment that this transaction applies to- Specified by:
setOrderPaymentin interfacePaymentTransaction
-
getParentTransaction
Description copied from interface:PaymentTransactionTransactions can have a parent-child relationship for modifying transactions that can occur. Examples of this:PaymentTransactionType.CAPTURE->PaymentTransactionType.AUTHORIZEPaymentTransactionType.REFUND->PaymentTransactionType.CAPTUREORPaymentTransactionType.SETTLEDPaymentTransactionType.SETTLED->PaymentTransactionType.CAPTUREPaymentTransactionType.VOID->PaymentTransactionType.CAPTUREPaymentTransactionType.REVERSE_AUTH->PaymentTransactionType.AUTHORIZE
For
PaymentTransactionType.UNCONFIRMED, they will have children that will be eitherPaymentTransactionType.AUTHORIZEorPaymentTransactionType.AUTHORIZE_AND_CAPTURE.- Specified by:
getParentTransactionin interfacePaymentTransaction- Returns:
-
setParentTransaction
- Specified by:
setParentTransactionin interfacePaymentTransaction
-
getType
public org.broadleafcommerce.common.payment.PaymentTransactionType getType()Description copied from interface:PaymentTransactionThe type of- Specified by:
getTypein interfacePaymentTransaction- Returns:
-
setType
public void setType(org.broadleafcommerce.common.payment.PaymentTransactionType type) - Specified by:
setTypein interfacePaymentTransaction
-
getAmount
public org.broadleafcommerce.common.money.Money getAmount()Description copied from interface:PaymentTransactionGets the amount that this transaction is for- Specified by:
getAmountin interfacePaymentTransaction
-
setAmount
public void setAmount(org.broadleafcommerce.common.money.Money amount) Description copied from interface:PaymentTransactionSets the amount of this transaction- Specified by:
setAmountin interfacePaymentTransaction
-
getDate
Description copied from interface:PaymentTransactionGets the date that this transaction was made on- Specified by:
getDatein interfacePaymentTransaction
-
setDate
Description copied from interface:PaymentTransactionSets the date that this transaction was made on- Specified by:
setDatein interfacePaymentTransaction
-
getCustomerIpAddress
Description copied from interface:PaymentTransactionGets theCustomerIP address that instigated this transaction. This is an optional field- Specified by:
getCustomerIpAddressin interfacePaymentTransaction
-
setCustomerIpAddress
Description copied from interface:PaymentTransactionSets theCustomerIP address that instigated the transaction. This is an optional field.- Specified by:
setCustomerIpAddressin interfacePaymentTransaction
-
getRawResponse
Description copied from interface:PaymentTransactionGets the string-representation of the serialized response from the gateway. This is usually the complete request parameter map serialized in string form.- Specified by:
getRawResponsein interfacePaymentTransaction
-
setRawResponse
Description copied from interface:PaymentTransactionSets the raw response that was returned from the gateway.- Specified by:
setRawResponsein interfacePaymentTransaction
-
getSuccess
Description copied from interface:PaymentTransactionGets whether or not this transaction was successful. There are multiple reasons that a transaction could be unsuccessful such as failed credit card processing or any other errors from the gateway.- Specified by:
getSuccessin interfacePaymentTransaction
-
setSuccess
- Specified by:
setSuccessin interfacePaymentTransaction
-
getAdditionalFields
- Specified by:
getAdditionalFieldsin interfaceorg.broadleafcommerce.common.domain.AdditionalFields- Specified by:
getAdditionalFieldsin interfacePaymentTransaction
-
setAdditionalFields
- Specified by:
setAdditionalFieldsin interfaceorg.broadleafcommerce.common.domain.AdditionalFields- Specified by:
setAdditionalFieldsin interfacePaymentTransaction
-
isSaveToken
public boolean isSaveToken()Description copied from interface:PaymentTransactionIndicates whether or not this transaction on the Order Payment contains a payment token (i.e.
PaymentAdditionalFieldType.TOKEN) and should be saved as aCustomerPaymenton the user's profile- Specified by:
isSaveTokenin interfacePaymentTransaction- Returns:
- - whether or not this transaction should be tokenized
-
setSaveToken
public void setSaveToken(boolean saveToken) Description copied from interface:PaymentTransactionMark this transaction as containing (or going to contain) a token that should be saved on the user's profile as aCustomerPayment- Specified by:
setSaveTokenin interfacePaymentTransaction
-
getArchived
- Specified by:
getArchivedin interfaceorg.broadleafcommerce.common.persistence.Status
-
setArchived
- Specified by:
setArchivedin interfaceorg.broadleafcommerce.common.persistence.Status
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceorg.broadleafcommerce.common.persistence.Status
-
createOrRetrieveCopyInstance
public <G extends PaymentTransaction> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceorg.broadleafcommerce.common.copy.MultiTenantCloneable<PaymentTransaction>- Throws:
CloneNotSupportedException
-