Class PaymentSummary
- All Implemented Interfaces:
Serializable
- Author:
- Dima Myroniuk (dmyroniuk)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe list of restrictions that apply to payment access.com.broadleafcommerce.order.common.domain.AddressgetAddress(String addressType) Gathers one of the payment's relatedaddressesby typeThe collection of related addresses that may include billing or shipping addressesjavax.money.MonetaryAmountThe payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.javax.money.MonetaryAmountThe amount for which this payment is allotted.javax.money.MonetaryAmountThe total authorized amount for capture.javax.money.MonetaryAmountThe total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification.javax.money.MonetaryAmountThe total amount of AuthorizeAndCapture transactions that require external interaction.javax.money.MonetaryAmountThe total amount that is currently captured.javax.money.MonetaryAmountThe total detached credit amount.javax.money.MonetaryAmountThe total refunded amount.General use map to capture any additional attributes needed for this Paymentjavax.money.MonetaryAmountThe total amount sent to the payment gateway for authorize, and is waiting for a response about the transaction result.com.broadleafcommerce.order.common.domain.Addressjavax.money.MonetaryAmountThe total amount sent to the payment gateway for capture, and is waiting for a response about the transaction result.Returns the credit account number if this payment contains it in theattributes.javax.money.CurrencyUnitThe currency gathered fromgetAmount()General use map to capture any display properties for this Paymentjavax.money.MonetaryAmountThe total fees related to the transactionamountNote: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.javax.money.MonetaryAmountThe payment's total fulfillment cost.The gateway used to process this payment.javax.money.MonetaryAmountThe amount of taxes that are included in the subtotal (VAT).getName()The name of this payment.The id of the entity that owns this payment.Describes the owning entity of the payment.The id of this payment.com.broadleafcommerce.order.common.domain.Addressjavax.money.MonetaryAmountThe payment's total usually excluding adjustments, tax, fees, and shipping.javax.money.MonetaryAmountThe payment's total tax cost.javax.money.MonetaryAmountThe total amount ever captured, as opposed to the current snapshot of the captured amount represented ingetAmountCaptured().getType()The type of this payment like Credit Card or Gift Card.The version of this payment.inthashCode()booleanIndicates that the payment transaction has been flagged for manual review by fraud checks.booleanWhether or not the underlying payment method can only be used once.voidsetAccessRestrictions(List<String> accessRestrictions) The list of restrictions that apply to payment access.voidsetAddressByType(Map<String, com.broadleafcommerce.order.common.domain.Address> addressByType) The collection of related addresses that may include billing or shipping addressesvoidsetAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal) The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.voidsetAmount(javax.money.MonetaryAmount amount) The amount for which this payment is allotted.voidsetAmountAuthorized(javax.money.MonetaryAmount amountAuthorized) The total authorized amount for capture.voidsetAmountAwaiting3DSResult(javax.money.MonetaryAmount amountAwaiting3DSResult) The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification.voidsetAmountAwaitingExternalResult(javax.money.MonetaryAmount amountAwaitingExternalResult) The total amount of AuthorizeAndCapture transactions that require external interaction.voidsetAmountCaptured(javax.money.MonetaryAmount amountCaptured) The total amount that is currently captured.voidsetAmountCredited(javax.money.MonetaryAmount amountCredited) The total detached credit amount.voidsetAmountRefunded(javax.money.MonetaryAmount amountRefunded) The total refunded amount.voidsetAttributes(Map<String, String> attributes) General use map to capture any additional attributes needed for this PaymentvoidsetAuthorizeAmountAwaitingResult(javax.money.MonetaryAmount authorizeAmountAwaitingResult) The total amount sent to the payment gateway for authorize, and is waiting for a response about the transaction result.voidsetCaptureAmountAwaitingResult(javax.money.MonetaryAmount captureAmountAwaitingResult) The total amount sent to the payment gateway for capture, and is waiting for a response about the transaction result.voidsetDisplayAttributes(Map<String, String> displayAttributes) General use map to capture any display properties for this PaymentvoidsetFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees related to the transactionamountNote: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.voidsetFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The payment's total fulfillment cost.voidsetGatewayType(String gatewayType) The gateway used to process this payment.voidsetHasTransactionFlaggedForManualReview(boolean hasTransactionFlaggedForManualReview) Indicates that the payment transaction has been flagged for manual review by fraud checks.voidsetIncludedTaxTotal(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT).voidThe name of this payment.voidsetOwningEntityId(String owningEntityId) The id of the entity that owns this payment.voidsetOwningEntityType(String owningEntityType) Describes the owning entity of the payment.voidsetPaymentId(String paymentId) The id of this payment.voidsetSingleUsePaymentMethod(boolean isSingleUsePaymentMethod) Whether or not the underlying payment method can only be used once.voidsetSubtotal(javax.money.MonetaryAmount subtotal) The payment's total usually excluding adjustments, tax, fees, and shipping.voidsetTaxTotal(javax.money.MonetaryAmount taxTotal) The payment's total tax cost.voidsetTotalEverCaptured(javax.money.MonetaryAmount totalEverCaptured) The total amount ever captured, as opposed to the current snapshot of the captured amount represented ingetAmountCaptured().voidThe type of this payment like Credit Card or Gift Card.voidsetVersion(Integer version) The version of this payment.toString()
-
Constructor Details
-
PaymentSummary
public PaymentSummary()
-
-
Method Details
-
getAddress
Gathers one of the payment's relatedaddressesby type- Returns:
- The payment's related address identified by type
-
getBillingAddress
@Nullable public com.broadleafcommerce.order.common.domain.Address getBillingAddress() -
getShippingAddress
@Nullable public com.broadleafcommerce.order.common.domain.Address getShippingAddress() -
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()The currency gathered fromgetAmount()- Returns:
- The currency gathered from the amount
-
getCreditAccountNumber
Returns the credit account number if this payment contains it in theattributes.- Returns:
- the credit account number
- See Also:
-
getPaymentId
The id of this payment.- Returns:
- The id of this payment.
-
getName
The name of this payment. This name is typically something like "Visa ending in 1234".- Returns:
- The name of this payment.
-
getType
The type of this payment like Credit Card or Gift Card.- Returns:
- The type of this payment like Credit Card or Gift Card.
-
getGatewayType
The gateway used to process this payment. Only a SINGLE payment gateway can modify transactions on a particular payment.- Returns:
- The gateway used to process this payment.
-
getOwningEntityType
Describes the owning entity of the payment. For example, the payment could have originated with a cart or a subscription, therefore this value might be CART or SUBSCRIPTION.- Returns:
- The type describing the owning entity of the payment
-
getOwningEntityId
The id of the entity that owns this payment. For example, this may be a cart id, or a subscription billing cycle id.- Returns:
- The id of the entity that owns this payment.
-
getAddressByType
The collection of related addresses that may include billing or shipping addresses- Returns:
- The collection of related addresses
-
getAttributes
General use map to capture any additional attributes needed for this Payment- Returns:
- General use map to capture any additional attributes needed for this Payment
-
getDisplayAttributes
General use map to capture any display properties for this Payment- Returns:
- General use map to capture any display properties for this Payment
-
isSingleUsePaymentMethod
public boolean isSingleUsePaymentMethod()Whether or not the underlying payment method can only be used once. In most cases, we're managing a single-use token that represents a credit card. This flag is especially important for managing payments with successful transactions. In those cases, the token has already been used and cannot be reused. If we need modify the payment's amount, then we may actually need to archive the existing payment, and create a new payment, with a new underlying token. Additionally, this flag is helpful when needing to re-authorize an expired authorization transaction. In that case, if the payment represents a single-use payment method, then the re-authorization may not be possible, and you'll need to seek an alternative form of payment.- Returns:
- Whether or not the underlying payment method can only be used once
-
getAmount
public javax.money.MonetaryAmount getAmount()The amount for which this payment is allotted. If specified, the amount details should be equal to this amount using the following equation: transactionAmount =subtotal+fulfillmentTotal+feesTotal-adjustmentsTotal+taxTotal-includedTaxTotal.- Returns:
- The amount for which this payment is allotted.
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()The payment's total usually excluding adjustments, tax, fees, and shipping. Note: Only theamountis required, but if this value is included, then thefulfillmentTotal,feesTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Returns:
- The payment's total usually excluding adjustments, tax, fees, and shipping.
-
getAdjustmentsTotal
public javax.money.MonetaryAmount getAdjustmentsTotal()The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts. Note: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,taxTotal, &includedTaxTotalshould be included also.- Returns:
- The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.
-
getFulfillmentTotal
public javax.money.MonetaryAmount getFulfillmentTotal()The payment's total fulfillment cost. Note: Only theamountis required, but if this value is included, then thesubtotal,feesTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Returns:
- The payment's total fulfillment cost.
-
getFeesTotal
public javax.money.MonetaryAmount getFeesTotal()The total fees related to the transactionamountNote: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Returns:
- The total fees related to the transaction
amount
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()The payment's total tax cost. Note: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,adjustmentsTotal, &includedTaxTotalshould be included also.- Returns:
- The payment's total tax cost.
-
getIncludedTaxTotal
public javax.money.MonetaryAmount getIncludedTaxTotal()The amount of taxes that are included in the subtotal (VAT). Note: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,adjustmentsTotal, &taxTotalshould be included also.- Returns:
- The amount of taxes that are included in the subtotal (VAT).
-
getAmountAuthorized
public javax.money.MonetaryAmount getAmountAuthorized()The total authorized amount for capture. This value is calculated as "total authorized - total reverse-authed".- Returns:
- the total authorized amount for capture
-
getAmountCaptured
public javax.money.MonetaryAmount getAmountCaptured()The total amount that is currently captured. This value is calculated as "total captured - total refunded".- Returns:
- The total amount that is currently captured
-
getTotalEverCaptured
public javax.money.MonetaryAmount getTotalEverCaptured()The total amount ever captured, as opposed to the current snapshot of the captured amount represented ingetAmountCaptured().- Returns:
- The total amount ever captured
-
getAmountRefunded
public javax.money.MonetaryAmount getAmountRefunded()The total refunded amount.- Returns:
- the total refunded amount
-
getAmountCredited
public javax.money.MonetaryAmount getAmountCredited()The total detached credit amount.- Returns:
- the total detached credit amount
-
getAmountAwaiting3DSResult
public javax.money.MonetaryAmount getAmountAwaiting3DSResult()The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification. Note: this excludes transactions that previously required 3DS verification, but we now have transaction results for.This value should only be present for payment gateways that support 3DS verification.
- Returns:
- The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification.
-
getAuthorizeAmountAwaitingResult
public javax.money.MonetaryAmount getAuthorizeAmountAwaitingResult()The total amount sent to the payment gateway for authorize, and is waiting for a response about the transaction result.Typically authorize transactions have immediate result, but sometimes the result can be pending for certain gateways.
- Returns:
- the total amount sent to the payment gateway for authorize and is waiting for a response about the transaction result
-
getCaptureAmountAwaitingResult
public javax.money.MonetaryAmount getCaptureAmountAwaitingResult()The total amount sent to the payment gateway for capture, and is waiting for a response about the transaction result.This value should only be present for payment gateways that support asynchronous transaction executions.
- Returns:
- the total amount sent to the payment gateway for capture and is waiting for a response about the transaction result
-
getVersion
The version of this payment. Used for checking that the requested version of the payment is up-to-date before saving changes. Required for any request which results in an update being made to the payment. This should never be manually incremented/decremented. -
isHasTransactionFlaggedForManualReview
public boolean isHasTransactionFlaggedForManualReview()Indicates that the payment transaction has been flagged for manual review by fraud checks.- Returns:
- true if the transaction has been flagged for manual review
-
getAccessRestrictions
The list of restrictions that apply to payment access.- Returns:
- the list of restrictions that apply to payment access
-
getAmountAwaitingExternalResult
public javax.money.MonetaryAmount getAmountAwaitingExternalResult()The total amount of AuthorizeAndCapture transactions that require external interaction.This value should only be present for payment gateways that support external interaction.
- Returns:
- The total amount of AuthorizeAndCapture transactions that require external interaction.
-
setPaymentId
The id of this payment.- Parameters:
id- The id of this payment.
-
setName
The name of this payment. This name is typically something like "Visa ending in 1234".- Parameters:
name- The name of this payment.
-
setType
The type of this payment like Credit Card or Gift Card.- Parameters:
type- The type of this payment like Credit Card or Gift Card.
-
setGatewayType
The gateway used to process this payment. Only a SINGLE payment gateway can modify transactions on a particular payment.- Parameters:
gatewayType- The gateway used to process this payment.
-
setOwningEntityType
Describes the owning entity of the payment. For example, the payment could have originated with a cart or a subscription, therefore this value might be CART or SUBSCRIPTION.- Parameters:
owningEntityType- The type describing the owning entity of the payment
-
setOwningEntityId
The id of the entity that owns this payment. For example, this may be a cart id, or a subscription billing cycle id.- Parameters:
owningEntityId- The id of the entity that owns this payment.
-
setAddressByType
public void setAddressByType(Map<String, com.broadleafcommerce.order.common.domain.Address> addressByType) The collection of related addresses that may include billing or shipping addresses- Parameters:
addressByType- The collection of related addresses
-
setAttributes
General use map to capture any additional attributes needed for this Payment- Parameters:
attributes- General use map to capture any additional attributes needed for this Payment
-
setDisplayAttributes
General use map to capture any display properties for this Payment- Parameters:
displayAttributes- General use map to capture any display properties for this Payment
-
setSingleUsePaymentMethod
public void setSingleUsePaymentMethod(boolean isSingleUsePaymentMethod) Whether or not the underlying payment method can only be used once. In most cases, we're managing a single-use token that represents a credit card. This flag is especially important for managing payments with successful transactions. In those cases, the token has already been used and cannot be reused. If we need modify the payment's amount, then we may actually need to archive the existing payment, and create a new payment, with a new underlying token. Additionally, this flag is helpful when needing to re-authorize an expired authorization transaction. In that case, if the payment represents a single-use payment method, then the re-authorization may not be possible, and you'll need to seek an alternative form of payment.- Parameters:
isSingleUsePaymentMethod- Whether or not the underlying payment method can only be used once
-
setAmount
public void setAmount(javax.money.MonetaryAmount amount) The amount for which this payment is allotted. If specified, the amount details should be equal to this amount using the following equation: transactionAmount =subtotal+fulfillmentTotal+feesTotal-adjustmentsTotal+taxTotal-includedTaxTotal.- Parameters:
amount- The amount for which this payment is allotted.
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal) The payment's total usually excluding adjustments, tax, fees, and shipping. Note: Only theamountis required, but if this value is included, then thefulfillmentTotal,feesTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Parameters:
subtotal- The payment's total usually excluding adjustments, tax, fees, and shipping.
-
setAdjustmentsTotal
public void setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal) The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts. Note: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,taxTotal, &includedTaxTotalshould be included also.- Parameters:
adjustmentsTotal- The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.
-
setFulfillmentTotal
public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The payment's total fulfillment cost. Note: Only theamountis required, but if this value is included, then thesubtotal,feesTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Parameters:
fulfillmentTotal- The payment's total fulfillment cost.
-
setFeesTotal
public void setFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees related to the transactionamountNote: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Parameters:
feesTotal- The total fees related to the transactionamount
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal) The payment's total tax cost. Note: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,adjustmentsTotal, &includedTaxTotalshould be included also.- Parameters:
taxTotal- The payment's total tax cost.
-
setIncludedTaxTotal
public void setIncludedTaxTotal(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT). Note: Only theamountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,adjustmentsTotal, &taxTotalshould be included also.- Parameters:
includedTaxTotal- The amount of taxes that are included in the subtotal (VAT).
-
setAmountAuthorized
public void setAmountAuthorized(javax.money.MonetaryAmount amountAuthorized) The total authorized amount for capture. This value is calculated as "total authorized - total reverse-authed".- Parameters:
amountAuthorized- the total authorized amount for capture
-
setAmountCaptured
public void setAmountCaptured(javax.money.MonetaryAmount amountCaptured) The total amount that is currently captured. This value is calculated as "total captured - total refunded".- Parameters:
amountCaptured- The total amount that is currently captured
-
setTotalEverCaptured
public void setTotalEverCaptured(javax.money.MonetaryAmount totalEverCaptured) The total amount ever captured, as opposed to the current snapshot of the captured amount represented ingetAmountCaptured().- Parameters:
totalEverCaptured- The total amount ever captured
-
setAmountRefunded
public void setAmountRefunded(javax.money.MonetaryAmount amountRefunded) The total refunded amount.- Parameters:
amountRefunded- the total refunded amount
-
setAmountCredited
public void setAmountCredited(javax.money.MonetaryAmount amountCredited) The total detached credit amount.- Parameters:
amountCredited- the total detached credit amount
-
setAmountAwaiting3DSResult
public void setAmountAwaiting3DSResult(javax.money.MonetaryAmount amountAwaiting3DSResult) The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification. Note: this excludes transactions that previously required 3DS verification, but we now have transaction results for.This value should only be present for payment gateways that support 3DS verification.
- Parameters:
amountAwaiting3DSResult- The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification.
-
setAuthorizeAmountAwaitingResult
public void setAuthorizeAmountAwaitingResult(javax.money.MonetaryAmount authorizeAmountAwaitingResult) The total amount sent to the payment gateway for authorize, and is waiting for a response about the transaction result.Typically authorize transactions have immediate result, but sometimes the result can be pending for certain gateways.
- Parameters:
authorizeAmountAwaitingResult- the total amount sent to the payment gateway for authorize and is waiting for a response about the transaction result
-
setCaptureAmountAwaitingResult
public void setCaptureAmountAwaitingResult(javax.money.MonetaryAmount captureAmountAwaitingResult) The total amount sent to the payment gateway for capture, and is waiting for a response about the transaction result.This value should only be present for payment gateways that support asynchronous transaction executions.
- Parameters:
captureAmountAwaitingResult- the total amount sent to the payment gateway for capture and is waiting for a response about the transaction result
-
setVersion
The version of this payment. Used for checking that the requested version of the payment is up-to-date before saving changes. Required for any request which results in an update being made to the payment. This should never be manually incremented/decremented. -
setHasTransactionFlaggedForManualReview
public void setHasTransactionFlaggedForManualReview(boolean hasTransactionFlaggedForManualReview) Indicates that the payment transaction has been flagged for manual review by fraud checks.- Parameters:
hasTransactionFlaggedForManualReview- whether the transaction has been marked for manual review
-
setAccessRestrictions
The list of restrictions that apply to payment access.- Parameters:
accessRestrictions- the list of restrictions that apply to payment access
-
setAmountAwaitingExternalResult
public void setAmountAwaitingExternalResult(javax.money.MonetaryAmount amountAwaitingExternalResult) The total amount of AuthorizeAndCapture transactions that require external interaction.This value should only be present for payment gateways that support external interaction.
- Parameters:
amountAwaitingExternalResult- The total amount of AuthorizeAndCapture transactions that require external interaction.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-