The InvoiceRequest
object represents the customer’s request to be billed for a purchase. It implements the PaymentGroup
interface and extends atg.commerce.order.PaymentGroupImpl
. In addition to the usual payment group fields, InvoiceRequest
holds a purchase order number and a billing address, which are mandatory, and can also include the user’s preferred invoice format and delivery mode, the payment due date, and the payment terms.
Use the atg.b2bcommerce.order.purchase
class to create an InvoiceRequest
payment group. This form handler has only one implemented method, handleNewInvoiceRequest()
. It also includes empty preCreateInvoiceRequest()
and postCreateInvoiceRequest()
methods for you to extend if your site requires.
Property | Description |
---|---|
| Indicates the type of |
| Boolean property that determines whether to add the |
| The |
| A reference to a new |
| The name of the Profile that holds the user’s billing address. |
| Maps |
HandleNewInvoiceRequest()
uses GetBillingAddressPropertyName()
to check the user’s profile for a business address. If one is found, it becomes the InvoiceRequest
’s billingAddress
as well. Then getInvoiceRequestPropertiesMap()
copies over the specified information from the user’s contract, if one exists, to the InvoiceRequest
. See the Using Requisitions and Contracts chapter for more information on these properties.
The InvoiceRequestInfo
object includes the above information and adds references to the Order
and PaymentGroup
to be used when the invoice is paid.
Invoice validation is done as part of the ValidateForCheckout
pipeline chain; see the Commerce Processor Chains section of this manual for more information on this chain. It ensures that the PaymentGroup
contains a valid billing address. Optionally, it verifies that the poNumber
property is not empty. This is optional so you can configure your site to offer payment by invoice without requiring a purchase at the time the invoice is created.