Payment processing

The payment processing services are inbound services provided by the WebSphere Commerce Payments component. The first service, the get payment entity service, is used to query the statuses of credits, payments and payment instructions. The second service, the process payment action service, is used to process the following payment actions:

Requests to the get payment entity service are in the form of GetPaymentEntity business object documents (BODs).

Responses of the get payment entity service are in the form of ShowPaymentEntity BODs, or SOAPFaults in case of exceptions.

Requests to the process payment action service are in the form of ProcessPaymentAction business object documents.

Responses of the process payment action service are in the form of AcknowledgePaymentAction BODs, or SOAPFaults in case of exceptions.


Mapping

The get payment entity service is mapped to the PaymentEntityGet command. The following table describes how the GetPaymentEntity BOD will be mapped to the input parameters of this command:

XPath Description Input Parameter Mandatory
DataArea/PaymentEntity/PaymentContext this element describes the payment context
DataArea/PaymentEntity/PaymentContext/ChannelId the channel ID channelId y
DataArea/PaymentEntity/PaymentContext/Locale the locale locale y
DataArea/PaymentEntity/PaymentContext/PaymentConfigurationGroupId the payment configuration group ID paymentConfigurationGroupId y
DataArea/PaymentEntity/PaymentContext/StoreId the WebSphere Commerce store ID storeId y
DataArea/PaymentEntity/Credit/Id the credit ID creditId n
DataArea/PaymentEntity/Payment/Id the payment ID paymentId n
DataArea/PaymentEntity/PaymentInstruction/Id the payment instruction ID paymentInstructionId n

The process payment action service is mapped to the PaymentActionProcess command. The following table describes how the ProcessPaymentAction BOD will be mapped to the input parameters of this command:

XPath Input Parameter Mandatory Description
DataArea/PaymentAction/PaymentContext this element describes the payment context
DataArea/PaymentAction/PaymentContext/ChannelId channelId y the channel ID
DataArea/PaymentAction/PaymentContext/Locale locale y the locale
DataArea/PaymentAction/PaymentContext/PaymentConfigurationGroupId paymentConfigurationGroupId y the payment configuration group ID
DataArea/PaymentAction/PaymentContext/StoreId storeId y the WebSphere Commerce store ID
DataArea/PaymentAction/Action action y the payment action. Can be one of the following: createPaymentInstruction

  • editPaymentInstruction

  • deletePaymentInstruction

  • closePaymentInstruction

  • checkPaymentInstruction validatePaymentInstruction

  • createPayment

  • editPayment

  • approve

  • approveAndDeposit

  • deposit

  • reverseApprovedPayment

  • reverseDepositedPayment

  • createCredit

  • editCredit

  • credit

  • reverseCredit

DataArea/PaymentAction/Amount amount n the amount to approve and/or deposit from a payment, or credit from a credit
DataArea/PaymentAction/ReasonCode reasonCode n the reason code (for editPayment/editCredit)
DataArea/PaymentAction/ReferenceNumber referenceNumber n the reference number (for editPayment/editCredit)
DataArea/PaymentAction/ResponseCode responseCode n the response code (for editPayment/editCredit)
DataArea/PaymentAction/ExtendedData the extended data (for editPayment/editCredit)
DataArea/PaymentAction/ExtendedData/NameValuePair[i] n the i-th extended data name-value pair (NVP)
DataArea/PaymentAction/ExtendedData/NameValuePair[i]/Name extendedDataName_i n the name of the i-th NVP
DataArea/PaymentAction/ExtendedData/NameValuePair[i]/Value extendedDataValue_i n the value of the i-th NVP
DataArea/PaymentAction/PaymentEntity/Credit this element describes the credit (for createCredit/editCredit/credit)
DataArea/PaymentAction/PaymentEntity/Credit/Id creditId n the credit ID
DataArea/PaymentAction/PaymentEntity/Credit/State state n the credit state
DataArea/PaymentAction/PaymentEntity/Credit/PaymentInstruction/Id paymentInstructionId n the payment instruction ID
DataArea/PaymentAction/PaymentEntity/Payment this element describes the payment (for createPayment/editPayment/approve/approveAndDeposit)
DataArea/PaymentAction/PaymentEntity/Payment/Id paymentId n the payment ID
DataArea/PaymentAction/PaymentEntity/Payment/State state n the payment state
DataArea/PaymentAction/PaymentEntity/Payment/PaymentInstruction/Id paymentInstructionId n the payment instruction ID
DataArea/PaymentAction/PaymentEntity/PaymentInstruction this element describes the payment instruction (for createPaymentInstruction etc.)

Note: Only one payment instruction is acceptable for each PaymentInstruction related actions

DataArea/PaymentAction/PaymentEntity/PaymentInstruction/Id paymentInstructionId n the payment instruction ID
DataArea/PaymentAction/PaymentEntity/PaymentInstruction/Amount amount n the amount of the payment instruction
DataArea/PaymentAction/PaymentEntity/PaymentInstruction/ currency n the currency of the payment instruction
DataArea/PaymentAction/PaymentEntity/PaymentInstruction/OrderId ordered n the order ID of the payment instruction
DataArea/PaymentAction/PaymentEntity/PaymentInstruction/PaymentSystemName paymentSystemName n the payment system name of the payment instruction
DataArea/PaymentAction/PaymentEntity/PaymentInstruction/ExtendedData the extended data of the payment instruction
DataArea/PaymentAction/PaymentEntity/PaymentInstruction/ExtendedData/NameValuePair[i] the i-th extended data NVP of the payment instruction
DataArea/PaymentAction/PaymentEntity/PaymentInstruction/ExtendedData/NameValuePair[i]/Name extendedDataName_i n the name of the i-th NVP
DataArea/PaymentAction/PaymentEntity/PaymentInstruction/ExtendedData/NameValuePair[i]/Value extendedDataValue_i n the value of the i-th NVP


Example

The following is a sample request to the process payment action service and its corresponding response:

The following is a sample request to the get payment entity service and its corresponding response:

Response:


WSDL

The WSDL file of this service can be found in the following JAR file:

Under the following path:

META-INF/jaxrpc/WebSphereCommerce/WebSphereCommerce-OMS.wsdl


Related concepts
WebSphere Commerce Web services with JSP pages
Understanding the WebSphere Commerce Web service framework


Related reference
Inbound web services provided