Class Name |
|
---|---|
Component(s) |
|
The PaymentGroupDroplet
servlet bean is used to initialize a user’s PaymentGroups
and CommerceIdentifierPaymentInfo
objects for use by the PaymentGroupFormHandler
. The PaymentGroupDroplet
servlet bean is instantiated from atg.commerce.order.purchase.PaymentGroupDroplet
. The PaymentGroupDroplet
class is composed of the following containers:
PaymentGroupMapContainer
- a container for the user’s namedPaymentGroup
objects.CommerceIdentifierPaymentInfoContainer
- a container for theCommerceIdentifierPaymentInfo
objects for theCommerceIdentifier
objects in the user’sOrder
.
For more information on these containers, the PaymentGroupDroplet
servlet bean, and the PaymentGroupFormHandler
form handler, refer to the Preparing a Complex Order for Checkout section in the Configuring Purchase Process Services chapter in the ATG Commerce Programming Guide.
Input Parameters
clear
When this parameter is set to true, PaymentGroupDroplet
clears both the user’s CommerceIdentifierPaymentInfoContainer
and PaymentGroupMapContainer
.
clearPaymentGroups
When this parameter is set to true, PaymentGroupDroplet
clears the user’s PaymentGroupMapContainer
. This should be done at least once per Order
if the PaymentGroup
objects are subject to change after placing an Order
(most likely because the PaymentGroup
objects are from the ClaimableRepository
).
clearPaymentInfos
When this parameter is set to true, PaymentGroupDroplet
clears the user’s CommerceIdentifierPaymentInfoContainer
. This should be done at least once per Order
to create fresh CommerceIdentifierPaymentInfo
objects that refer to each Order
’s unique CommerceIdentifier
objects.
initBasedonOrder
When set to true, this parameter creates a CommerceIdentifierPaymentInfo
for each payment group relationship in the order. The payment group relationship can be CommerceItem
, ShippingGroup
or Order
.
The items created can be TaxPaymentInfo
, OrderPaymentInfo
, ShippingGroupPaymentInfo
or CommerceItemPaymentInfo
, based on the payment relationship type.
initItemPayment
When this parameter is set to true, PaymentGroupDroplet
creates a CommerceItemPaymentInfo
object for each CommerceItem
in the order and adds them to the CommerceIdentifierPaymentInfoContainer
.
A CommerceItemPaymentInfo
object is a CommerceIdentifierPaymentInfo
object whose CommerceIdentifier
is a CommerceItem
; it is used for CommerceItem
payment information.
initOrderPayment
When this parameter is set to true, PaymentGroupDroplet
creates an OrderPaymentInfo
object and adds it to the CommerceIdentifierPaymentInfoContainer
.
An OrderPaymentInfo
object is a CommerceIdentifierPaymentInfo
object whose CommerceIdentifier
is an Order
; it is used for Order
payment information.
initPaymentGroups
When this parameter is set to true, the PaymentGroup
types supplied in the paymentGroupTypes
input parameter will be initialized.
initShippingPayment
When this parameter is set to true, PaymentGroupDroplet
creates a ShippingGroupPaymentInfo
object for each ShippingGroup
in the order and adds them to the CommerceIdentifierPaymentInfoContainer
.
A ShippingGroupPaymentInfo
object is a CommerceIdentifierPaymentInfo
object whose CommerceIdentifier
is a ShippingGroup
; it is used for ShippingGroup
payment information.
initTaxPayment
When this parameter is set to true, PaymentGroupDroplet
creates a TaxPaymentInfo
object and adds it to the CommerceIdentifierPaymentInfoContainer
.
A TaxPaymentInfo
object is a CommerceIdentifierPaymentInfo
object whose CommerceIdentifier
is an Order
; it is used for tax payment information.
order
The user’s order. You can use this parameter to override the default setting for PaymentGroupDroplet.order
.
paymentGroupTypes
A comma-separated list of PaymentGroup
types, such as creditCard
, storeCredit
, giftCertificate
, that is used to determine which PaymentGroupInitializer
components are executed.
The PaymentGroupInitializer
components are responsible for creating and initializing the appropriate PaymentGroup
objects and adding them to the PaymentGroupMapContainer
. Each possible PaymentGroup
type is configured to reference a PaymentGroupInitializer
component in the PaymentGroupInitializer
ServiceMap
. The keys into the map are the Strings
supplied in this paymentGroupTypes
input parameter; the values are the underlying PaymentGroupInitializer
components that do the initialization work for that PaymentGroup
type.
By default, the PaymentGroupDroplet
servlet bean is configured with the following PaymentGroupInitializer
components:
## ServiceMap of paymentGroupTypes to PaymentGroupInitializer Nucleus components paymentGroupInitializers=\ giftCertificate=/atg/commerce/order/purchase/GiftCertificateInitializer,\ storeCredit=/atg/commerce/order/purchase/StoreCreditInitializer,\ creditCard=/atg/commerce/order/purchase/CreditCardInitializer
Output Parameters
paymentInfo
The Map referenced by the CommerceIdentifierPaymentInfoContainer
.
order
The Order
object that represents the user’s order.
paymentGroups
The Map referenced by the PaymentGroupMapContainer
.
Open Parameters
output
The open parameter rendered always.
Example
This example creates CreditCard
, StoreCredit
, and GiftCertificate PaymentGroup
objects based on their availability for the current user. Additionally, it creates CommerceItemPaymentInfo
objects, ShippingGroupPaymentInfo
objects, and a TaxPaymentInfo
object. The example enables the user to pay for CommerceIdentifiers
at the line item level with any of their available PaymentGroup
objects.
<dsp:droplet name="PaymentGroupDroplet"> <dsp:param value="true" name="clear"/> <dsp:param value="giftCertificates, storeCredit, creditCard" name="paymentGroupTypes"/> <dsp:param value="true" name="initPaymentGroups"/> <dsp:param value="true" name="initItemPayment"/> <dsp:param value="true" name="initTaxPayment"/> <dsp:param value="true" name="initShippingPayment"/> <dsp:oparam name="output">Manipulation of objects here… </dsp:output> </dsp:droplet>