6.0.0.2 Delete a payment instruction

This service deletes a payment instruction. The client has a reference to the order facade client; a shopping cart exists on the server and there are some payment instructions.

 

Request

Request BOD ChangeOrder business object document (BOD).
Schema Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ChangeOrder.xsd
Service data object com.ibm.commerce.order.facade.datatypes.ChangeOrderType

  1. The client calls the order facade client method deletePaymentInstruction() with the following parameters: (orderId, piId).

  2. OrderFacadeClient composes an SDO and calls the ChangeOrder service using the action code Delete and XPath query

    /Order/OrderPaymentInfo/PaymentInstruction

  3. The payment instructions are deleted in the WebSphere Commerce Server.

  4. The Order component responds with a RespondOrder BOD with the order ID.

Sample request BOD

<soapenv:Envelope
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <soapenv:Header />
        <soapenv:Body>
                <_ord:ChangeOrder
                       
xmlns:_ord="http://www.ibm.com/xmlns/prod/commerce/9/order"
                       
xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation"
                       
xmlns:oa="http://www.openapplications.org/oagis/9"
                       
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                        <oa:ApplicationArea
xsi:type="_wcf:ApplicationAreaType">
                                <oa:CreationDateTime>
                                        2007-01-26T19:16:59.125Z
                                </oa:CreationDateTime>
                                <oa:BODID>
                                       
bcafa490-ad2e-11db-832d-831645b86890
                                </oa:BODID>
                        </oa:ApplicationArea>
                        <_ord:DataArea>
                                <oa:Change>
                                        <oa:ActionCriteria>
                                               
<oa:ActionExpression actionCode="Delete"
                                                       
expressionLanguage="wc:XPath">
                                                       
/Order/OrderPaymentInfo/PaymentInstruction
                                               
</oa:ActionExpression>
                                        </oa:ActionCriteria>
                                </oa:Change>
                                <_ord:Order>
                                       
<_ord:OrderIdentifier>
                                               
<_wcf:UniqueID>.</_wcf:UniqueID>
                                       
</_ord:OrderIdentifier>
                                       
<_ord:OrderPaymentInfo>
                                               
<_ord:PaymentInstruction>
                                                       
<_ord:UniqueID>31536</_ord:UniqueID>
                                               
</_ord:PaymentInstruction>
                                       
</_ord:OrderPaymentInfo>
                                </_ord:Order>
                        </_ord:DataArea>
                </_ord:ChangeOrder>
        </soapenv:Body>
</soapenv:Envelope>

 

Response

The response is a RespondOrder BOD with the order ID.

Response BOD RespondOrder
Schema Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/RespondOrder.xsd
Service data object com.ibm.commerce.order.facade.datatypes.RespondOrderType

The response contains the following information:

/Order/OrderIdentifier/UniqueID/

 

Sample response BOD

<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <ance ">
  <soapenv:Header />
  <soapenv:Body>
   <_ord:ChangeOrder
    xmlns:_ord="http://www.ibm.com/xmlns/prod/commerce/9/order"
   
xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation"
    xmlns:oa="http://www.openapplications.org/oagis/9"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <oa:ApplicationArea
     xsi:type="_wcf:ApplicationAreaType">
     <oa:CreationDateTime>
      2007-01-26T19:16:14.734Z
     </oa:CreationDateTime>
     <oa:BODID>
      a23a1d20-ad2e-11db-832d-831645b86890
     </oa:BODID>
    </oa:ApplicationArea>
    <_ord:DataArea>
     <oa:Change>
      <oa:ActionCriteria>
       <oa:ActionExpression actionCode="Update"
        expressionLanguage="wc:XPath">
        /Order/OrderPaymentInfo/PaymentInstruction
       </oa:ActionExpression>
      </oa:ActionCriteria>
     </oa:Change>
     <_ord:Order>
      <_ord:OrderIdentifier>
       <_wcf:UniqueID>.</_wcf:UniqueID>
      </_ord:OrderIdentifier>
      <_ord:OrderPaymentInfo>
       <_ord:PaymentInstruction>
        <_ord:UniqueID>31535</_ord:UniqueID>
       </_ord:PaymentInstruction>
      </_ord:OrderPaymentInfo>
     </_ord:Order>
    </_ord:DataArea>
   </_ord:ChangeOrder>
  </soapenv:Body>
</soapenv:Envelope>;

 

Exceptions

If there is something wrong with the parameter, the Order component fails to delete the payment instructions. The Order component responds RespondOrder BOD with ChangeStatus, which indicates that the action failed.

The exception conditions are the same as for PIRemove URL.

 

Customization

The following extensions are supported:

Related concepts

Service Data Objects (SDO)


Related Reference


WebSphere Commerce services
Order services