Payment in the fulfillment framework can be handled in two ways. The value of OrderFulfiller.settleOnFirstShipment determines how payment is handled:

You can also configure the fulfillment framework to charge each shipping group to a different credit card at the time of shipment. There are two methods in the system that can be overwritten to facilitate this behavior:

To facilitate payment by shipping group as each shipping group is shipped, your system must create the appropriate PaymentGroupRelationship objects. To pay for each shipping group separately (and the items that appear in each shipping group), you will probably create each of these PaymentGroupRelationship objects yourself. When a user creates an order, the default behavior is for the order to include one PaymentGroup with one PaymentGroupOrderRelationship that accounts for the cost of the entire order. You might want to create a PaymentGroupCommerceItemRelationship for each item in the order, and a PaymentGroupShippingGroupRelationship for each shipping group in the order. It depends on your business rules.

For more information on payment groups, see the Creating Payment Groups section. For more information on the payment manager, see the Processing Payment of Orders section.

loading table of contents...