placeOrderGroup()

OrderPlacementResponse placeOrderGroup(string orderGroupId, PaymentRequest paymentDetails) 

This method submits all the orders in the order group, and may pay the initial invoice.

Parameters

orderGroupId
Format: string
Purpose: Specifies the ID of the order group to submit for ordering.
paymentDetails
Format: PaymentRequest XML document
Purpose: (Optional) Defines a PaymentDetails XML document that specifies the payment details to pay the initial invoice. You can use getOrderGroupQuote() to calculate how much needs to be paid.

Example: Request a payment

This example shows a request for payment.

<PaymentRequest xmlns="http://xml.inomial.com/smile/2.xsd">
  <PaymentDetails>
    <PaymentType>Visa</PaymentType>
    <AccountName>Joe Smith</AccountName>
    <AccountNumber>2142472105</AccountNumber>
    <ExpiryDate>2012-12</ExpiryDate>
    <CVV>123</CVV>
    <PaymentAmount>$47.40</PaymentAmount>
    <IncludesSurchargeAmount>0.0</IncludesSurchargeAmount>
    <Properties>
      <Object></Object>
    </Properties>
  </PaymentDetails>
</PaymentRequest>

Results

This method returns an OrderPlacementResponse XML document containing the details of the order group and any payment that was made.

Smile emits the OrderEntered message after the orders are entered.

Example: A returned OrderPlacementResponse XML document

This example shows an OrderPlacementResponse XML document for an order that was submitted, but payment was declined.

<OrderPlacementResponse xmlns="http://xml.inomial.com/smile/2.xsd"
  xmlns="http://ws.inomial.com/smile.2">
  <OrderGroup>
    <OrderGroupNumber>105090</OrderGroupNumber>
    <AccountUSN>2142472105</AccountUSN>
    <Orders>
      <Order>
        <OrderNumber>105090</OrderNumber>
        <Order>
          <Package>4740</Package>
          <RequiresApproval>false</RequiresApproval>
          <AccountUSN>2142472105</AccountUSN>
          <OrderForm>
            <Object>
              <String name="email.address">joe@example.com</String>
              <String name="account.name">Joe Smith</String>
            </Object>
          </OrderForm>
        </Order>
        <OrderedComponents>
          <Account>
            <USN>2142472105</USN>
            <ProvisionStatus>Provisioned</ProvisionStatus>
            <SuspendStatus>Active</SuspendStatus>
            <ActivateStatus>Activated</ActivateStatus>
            <EnableStatus>Enabled</EnableStatus>
            <InitialInvoice key="61419800">Tx 61419800 (14/01/15) $47.40</InitialInvoice>
          </Account>
        </OrderedComponents>
      </Order>
      <Order>
        <OrderNumber>105110</OrderNumber>
        <Order>
          <Package>61</Package>
          <RequiresApproval>false</RequiresApproval>
          <AccountUSN>2142472105</AccountUSN>
          <PackagePlan>36</PackagePlan>
          <OrderForm>
            <Object>
              <String name="username">amy@adsl.example.com</String>
            </Object>
          </OrderForm>
        </Order>
        <OrderedComponents>
          <Subscription>
            <USN>2142472303</USN>
            <ProvisionStatus>Provisioned</ProvisionStatus>
            <SuspendStatus>Active</SuspendStatus>
            <ActivateStatus>Activated</ActivateStatus>
            <EnableStatus>Enabled</EnableStatus>
            <InitialInvoice key="61419800">Tx 61419800 (14/01/15) $47.40</InitialInvoice>
            <SID>47</SID>
          </Subscription>
        </OrderedComponents>
      </Order>
    </Orders>
  </OrderGroup>
  <PaymentResponse>
    <Payment>
      <PaymentNumber>61420006</PaymentNumber>
      <PaymentType>
        <Name>Visa</Name>
        <PaymentTypeCode>visa</PaymentTypeCode>
      </PaymentType>
      <Account>2142472105</Account>
      <Amount currency="AUD" formatted="$47.40">47.40</Amount>
      <Surcharge>
        <Amount currency="AUD" formatted="$0.00">0</Amount>
        <TaxAmount currency="AUD" formatted="$0.00">0</TaxAmount>
      </Surcharge>
      <Status>Declined</Status>
    </Payment>
  </PaymentResponse>
</OrderPlacementResponse>

Faults

NoSuchItemException

This fault is returned when payment type or the order group does not exist.

OrderException

This fault is returned when the order fails.

InvalidRequestException

This fault is returned when the order group has already been placed or the payment details are not appropriate for the order group. For example, the amount is incorrect.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.PlaceOrderGroup orderGroupId [filename]
orderGroupId
Purpose: Specifies the ID of the order group to submit for ordering.
filename
Purpose: (Optional) Defines the filename of the PaymentRequestType XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.