Class AdjustOrderPaymentsActivity
- All Implemented Interfaces:
Activity<ProcessContext<Order>>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.core.Ordered
Another scenario this handles is if there is an unconfirmed Credit Card applied to the order. This can happen if the implementation is PCI-Compliant and the Credit Card number is sent to Broadleaf and will make a server to server call to the configured Payment Gateway.
For this default implementation, This algorithm will add up all the active applied payments to the order that are not of type 'UNCONFIRMED' AND (payment type 'THIRD_PARTY_ACCOUNT' OR 'CREDIT_CARD') The order.getTotal() minus all the applied payments that are NOT Unconfirmed and of a Third Party account will then be set as the new amount that should be processed by the Third Party Account.
Third Party Account Example: 1) Initial Checkout Step Order - Total = $30 - Order Payment (PayPal Express Checkout) - [Unconfirmed] $10 - Gift Card - [Unconfirmed] $10 - Customer Credit - [Unconfirmed] $10
2) Shipping Method picked and changes the order total Order - Total = $35 - Order Payment (PayPal Express Checkout) - [Unconfirmed] $10 - Gift Card - [Unconfirmed] $10 - Customer Credit - [Unconfirmed] $10
3) Adjust Order Payment Activity ($35 - ($10 + $10)) = $15 Order - Total = $35 - Order Payment (PayPal Express Checkout) - [Unconfirmed] $15 - Gift Card - [Unconfirmed] $10 - Customer Credit - [Unconfirmed] $10
- Author:
- Elbert Bautista (elbertbautista)
-
Field Summary
FieldsFields inherited from class org.broadleafcommerce.core.workflow.BaseActivity
automaticallyRegisterRollbackHandler, beanName, errorHandler, order, rollbackHandler, rollbackRegion, stateConfigurationFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ProcessContext<Order> context) Called by the encompassing processor to activate the execution of the ActivityMethods inherited from class org.broadleafcommerce.core.workflow.BaseActivity
getAutomaticallyRegisterRollbackHandler, getBeanName, getErrorHandler, getOrder, getRollbackHandler, getRollbackRegion, getStateConfiguration, setAutomaticallyRegisterRollbackHandler, setBeanName, setErrorHandler, setOrder, setRollbackHandler, setRollbackRegion, setStateConfiguration, shouldExecute
-
Field Details
-
ORDER
public static final int ORDER- See Also:
-
-
Constructor Details
-
AdjustOrderPaymentsActivity
public AdjustOrderPaymentsActivity()
-
-
Method Details