Motorprise users can use one or more payment methods to pay for each order. Each payment method is associated with a billing address. Payment methods can be applied to the entire order, or to a portion of the order such as a line item, the shipping cost, or tax. Valid payment methods for Motorprise include:

Users only see the payment methods that they are authorized to use. If users are authorized to request invoices, they will be able to enter as many PO or requisition numbers as they want. If users are authorized to use credit cards, they will be able to use those credit cards in their lists of authorized credit cards. In Motorprise, users cannot enter new credit cards; they must contact their company administrator to request a new payment method. You could set different restrictions on payment methods depending on your business model.

Checkout/billing.jsp first uses the AuthorizedPaymentTypesDroplet servlet bean to determine which PaymentGroup types the user can use. The AuthorizedPaymentTypesDroplet distinguishes between those users who are authorized to use credit cards, invoices, both, or neither. Subsequently, the servlet bean embeds a particular page fragment that includes the proper payment forms for that PaymentGroup type:

<dsp:droplet name="AuthorizedPaymentTypesDroplet">
      <dsp:param bean="Profile" name="profile"/>
      <dsp:oparam name="output">
        <dsp:droplet name="Switch">
          <dsp:param name="value" param="potentialPaymentTypes.creditCard"/>
          <dsp:oparam name="true">
            <dsp:droplet name="Switch">
              <dsp:param name="value"
                param="potentialPaymentTypes.invoiceRequest"/>
              <dsp:oparam name="true">
                <dsp:droplet name="IsEmpty">
                  <dsp:param bean="Profile.paymentTypes" name="value"/>
                  <dsp:oparam name="true">
                    <dsp:include page="billing_invoice.jsp" flush="true">
                      <dsp:param name="init" value="true"/></dsp:include>
                  </dsp:oparam>
                  <dsp:oparam name="false">
                    <dsp:include page="billing_invoice_cc.jsp" flush="true">
                      <dsp:param name="init" value="true"/></dsp:include>
                  </dsp:oparam>
                </dsp:droplet>
              </dsp:oparam>
              <dsp:oparam name="false">
                <dsp:droplet name="IsEmpty">
                  <dsp:param bean="Profile.paymentTypes" name="value"/>
                  <dsp:oparam name="true">
                    <dsp:include page="no_billing.jsp" flush="true"></dsp:include>
                  </dsp:oparam>
                  <dsp:oparam name="false">
                    <dsp:include page="billing_cc.jsp" flush="true"><dsp:param
                      name="init" value="true"/></dsp:include>
                  </dsp:oparam>
                </dsp:droplet>
              </dsp:oparam>
            </dsp:droplet>
          </dsp:oparam>
          <dsp:oparam name="false">
            <dsp:droplet name="Switch">
              <dsp:param name="value" param=
                "potentialPaymentTypes.invoiceRequest"/>
              <dsp:oparam name="true">
                <dsp:include page="billing_invoice.jsp" flush="true"><dsp:param
                  name="init" value="true"/></dsp:include>
              </dsp:oparam>
              <dsp:oparam name="false">
                <dsp:include page="no_billing.jsp" flush="true"></dsp:include>
              </dsp:oparam>
            </dsp:droplet>
          </dsp:oparam>
        </dsp:droplet>
      </dsp:oparam>
    </dsp:droplet>

The billing portion of the purchase process relies on PaymentGroup objects to encapsulate payment information. The associations between each PaymentGroup and the order are maintained in CommerceIdentifierPaymentInfo objects. The various billing page fragments use the PaymentGroupDroplet to create both the user’s PaymentGroups and CommerceIdentifierPaymentInfos. These are added to the user’s PaymentGroupMapContainer and CommerceIdentifierPaymentInfoContainer, which are session components that maintain these objects throughout the purchase process.

 
loading table of contents...