Get usable payment information
A client obtains available payment information (payment method and usable billing addresses for the payment method) for an order. The client has a reference to the order facade client.
Usage scenario
- The client calls the order facade client method getUsablePaymentInfo() with the following parameter: (orderId).
- OrderFacadeClient composes an SDO and calls the GetOrder service with XPath query...
/Order[OrderIdentifier[(UniqueID='1111')]]...and access profile WC_UsablePaymentInfoProfile which indicates that usable payment information is required.
- The Order component queries the database with the search condition from the XPath.
- The Order component composes the ShowOrder SDO according to the access profile.
Request
Request BOD GetOrder business object document (BOD) Schema
Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetOrder.xsdService data object
com.ibm.commerce.order.facade.datatypes.GetOrderType
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:GetOrder 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:27:43.265Z </oa:CreationDateTime> <oa:BODID> 3c9f9b50-ad30-11db-832d-831645b86890 </oa:BODID> </oa:ApplicationArea> <_ord:DataArea> <oa:Get> <oa:Expression expressionLanguage="wc:XPath"> {ibmwcf.ap=WC_UsablePaymentInfoProfile}/Order[OrderIdentifier[(UniqueID=43141)]] </oa:Expression> </oa:Get> </_ord:DataArea> </_ord:GetOrder> </soapenv:Body> </soapenv:Envelope>
Response
The response is the ShowOrder BOD containing the OrderID and usable payment information for the order.
Schema
Order-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowOrder.xsdService data object
com.ibm.commerce.order.facade.datatypes.ShowOrderTypeThe response contains the order information:
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"> <soapenv:Header /> <soapenv:Body> <_ord:ShowOrder 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"> <_ord:DataArea> <oa:Show recordSetCount="1" recordSetStartNumber="0" recordSetTotal="1" /> <_ord:Order> <_ord:OrderIdentifier> <_wcf:UniqueID>43141</_wcf:UniqueID> </_ord:OrderIdentifier> <_ord:OrderPaymentInfo /> <_ord:UsablePaymentInformation> <_ord:UsableBillingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:UsableBillingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:PaymentMethod> <_ord:PaymentMethodName> PayLater </_ord:PaymentMethodName> <_ord:Description language="-1"> Pay later </_ord:Description> </_ord:PaymentMethod> <_ord:PaymentTermConditionId /> </_ord:UsablePaymentInformation> <_ord:UsablePaymentInformation> <_ord:UsableBillingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:UsableBillingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:PaymentMethod> <_ord:PaymentMethodName> VISA </_ord:PaymentMethodName> <_ord:Description language="-1"> VISA Credit Card </_ord:Description> </_ord:PaymentMethod> <_ord:PaymentTermConditionId /> </_ord:UsablePaymentInformation> <_ord:UsablePaymentInformation> <_ord:UsableBillingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:UsableBillingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:PaymentMethod> <_ord:PaymentMethodName> Check </_ord:PaymentMethodName> <_ord:Description language="-1"> Check </_ord:Description> </_ord:PaymentMethod> <_ord:PaymentTermConditionId /> </_ord:UsablePaymentInformation> <_ord:UsablePaymentInformation> <_ord:UsableBillingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:UsableBillingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:PaymentMethod> <_ord:PaymentMethodName> Master Card </_ord:PaymentMethodName> <_ord:Description language="-1"> Master Card Credit Card </_ord:Description> </_ord:PaymentMethod> <_ord:PaymentTermConditionId /> </_ord:UsablePaymentInformation> <_ord:UsablePaymentInformation> <_ord:UsableBillingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:UsableBillingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:PaymentMethod> <_ord:PaymentMethodName> COD </_ord:PaymentMethodName> <_ord:Description language="-1"> Cash on delivery </_ord:Description> </_ord:PaymentMethod> <_ord:PaymentTermConditionId /> </_ord:UsablePaymentInformation> <_ord:UsablePaymentInformation> <_ord:UsableBillingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:UsableBillingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:PaymentMethod> <_ord:PaymentMethodName> AMEX </_ord:PaymentMethodName> <_ord:Description language="-1"> American Express Credit Card </_ord:Description> </_ord:PaymentMethod> <_ord:PaymentTermConditionId /> </_ord:UsablePaymentInformation> <_ord:UsablePaymentInformation> <_ord:UsableBillingAddress> <_wcf:UniqueID>-1000</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> wcsadmin </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:UsableBillingAddress> <_wcf:UniqueID>11301</_wcf:UniqueID> <_wcf:ExternalIdentifier> <_wcf:ContactInfoNickName> zhaogj1 </_wcf:ContactInfoNickName> </_wcf:ExternalIdentifier> </_ord:UsableBillingAddress> <_ord:PaymentMethod> <_ord:PaymentMethodName> BillMeLater </_ord:PaymentMethodName> <_ord:Description language="-1"> Bill me later </_ord:Description> </_ord:PaymentMethod> <_ord:PaymentTermConditionId /> </_ord:UsablePaymentInformation> </_ord:Order> </_ord:DataArea> </_ord:ShowOrder> </soapenv:Body> </soapenv:Envelope>
Exceptions
If there is something wrong with the parameter, the Order component fails to get the order. The Order component responds with a ShowOrder BOD with ChangeStatus, which indicates that the action failed.
See the exception conditions for UsablePaymentTCListDataBean and UsableBillingAddressListDataBean
Customization
The following extensions are supported:
- Extend the ComposeUsablePaymentInformationCmdImpl command to populate extra information into the ShowOrder object.
Related concepts
Service Data Objects (SDO)
Related Reference
WebSphere Commerce services
Order services