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:

  • Approve payment
  • Approve and deposit payment
  • Check payment instruction
  • Close payment instruction
  • Create credit
  • Create payment
  • Create payment instruction
  • Delete payment instruction
  • Deposit payment
  • Edit credit
  • Edit payment
  • Edit payment instruction
  • Reverse approved payment
  • Reverse credit
  • Reserve deposited payment
  • Validate payment instruction

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:


                           
                                                               
<?xml version="1.0" encoding="UTF-8"?>                       
        
                                <soapenv:Envelope               
            
                                   
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"          
               
                                   
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"          
               
                                   
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">          
                
                                    <soapenv:Header>er>   
                     
                                        <wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-secext-1.0.xsd">
                               
                                           
<wsse:UsernameToken>                           
                                               
<wsse:Username>wcsadmin</wsse:Username>                
         
                                                <wsse:Password 
                               
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-token-profile-1.0#PasswordText">*********</wsse:Password>
                             
                                           
</wsse:UsernameToken>                          
                                        </wsse:Security>     
                         
                                    </soapenv:Header>        
                     
                                    <soapenv:Body>           
             
                                        <wc:ProcessPaymentAction
releaseID="9.0" version="9.1"                                
                                            versionID="9.1"        
                   
                                           
xmlns:oa="http://www.openapplications.org/oagis/9"                 
       
                                            
                               
xmlns:wc="http://www.ibm.com/xmlns/prod/WebSphereCommerce"         
                  
                                            
                               
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                               
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/WebSphereCommerce

                                ../BODs/ProcessPaymentAction.xsd
">                             
                                           
<oa:ApplicationArea>                           
                                   
                                            
<oa:CreationDateTime>2001-12-31T12:00:00</oa:CreationDateTime>
                               
                                                
                               
<oa:BODID>2001-12-31T12:00:00[wcsadmin]localhost</oa:BODID>
                        
                                           
</oa:ApplicationArea>                          
                                            <wc:DataArea>    
                     
                                                <oa:Process/>
                         
                                               
<wc:PaymentAction>                             
                                                   
<wc:PaymentContext>                            
                                                       
<wc:ChannelId>-1</wc:ChannelId>                        
 
                                                       
<wc:Locale>en_US</wc:Locale>                           
 
                                                        
                               
<wc:PaymentConfigurationGroupId>default</wc:PaymentConfigurationGroupId>
                           
                                                       
<wc:StoreId>10001</wc:StoreId>                         
 
                                                   
</wc:PaymentContext>                           
                                                    
                               
<wc:Action>createPaymentInstruction</wc:Action>        
                    
                                                   
<wc:PaymentEntity>                             
                                                       
<wc:PaymentInstruction>                                
                                                           
<wc:Amount>100.0</wc:Amount>                           
 
                                                           
<wc:Currency>USD</wc:Currency>                         
 
                                                            
                               
<wc:PaymentSystemName>SimpleOffline</wc:PaymentSystemName>
                         
                                                           
<wc:ExtendedData>                              
                                                               
<wc:NameValuePair>                             
                                                                   

                               
<wc:Name>payment_method</wc:Name>                      
    
                                                                   
<wc:Value>VISA</wc:Value>                              
 
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   
<wc:Name>cc_brand</wc:Name>                            
 
                                                                   
<wc:Value>VISA</wc:Value>                              
 
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   
<wc:Name>account</wc:Name>                             
 
                                                                   

                               
<wc:Value>4111111111111111</wc:Value>                  
            
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                              
                                                     
<wc:Name>expire_month</wc:Name>                        

                                                                   
<wc:Value>01</wc:Value>                          
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   

                               
<wc:Name>expire_year</wc:Name>                         
    
                                                                   
<wc:Value>2010</wc:Value>                              
 
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   
<wc:Name>account</wc:Name>                             
 
                                                                   

                               
<wc:Value>4111111111111111</wc:Value>                  
            
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   

                               
<wc:Name>billto_address1</wc:Name>                     
    
                                                                   
<wc:Value>123 Main 
                                Street</wc:Value>            
            
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   

                               
<wc:Name>billto_city</wc:Name>                         
    
                                                                   
<wc:Value>Toronto</wc:Value>                           
 
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   

                               
<wc:Name>billto_stateprovince</wc:Name>                
            
                                                                   
<wc:Value>ON</wc:Value>                          
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   

                               
<wc:Name>billto_country</wc:Name>                      
    
                                                                   
<wc:Value>CA</wc:Value>                          
                                                               
</wc:NameValuePair>                            
                                                               
<wc:NameValuePair>                             
                                                                   
<wc:Name>billto_zipcode</wc:Name>                      
         
                                                                   
<wc:Value>M1M1M1</wc:Value>                            
 
                                                               
</wc:NameValuePair>                            
                                                           
</wc:ExtendedData>                             
                                                       
</wc:PaymentInstruction>                               
                                                   
</wc:PaymentEntity>                                          
 </wc:PaymentAction>                            
                                            </wc:DataArea>   
                     
                                       
</wc:ProcessPaymentAction>                                
</soapenv:Body>                                
                                </soapenv:Envelope>

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


<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"   
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">   
<soapenv:Header>t;
        <wsse:Security 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-secext-1.0.xsd">
            <wsse:UsernameToken>
               
<wsse:Username>wcsadmin</wsse:Username>t;
                <wsse:Password 
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-token-profile-1.0#PasswordText">wcs1admin</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>t;
        <wc:GetPaymentEntity releaseID="9.0" version="9.1"
            versionID="9.1"
            xmlns:oa="http://www.openapplications.org/oagis/9"
           
xmlns:wc="http://www.ibm.com/xmlns/prod/WebSphereCommerce"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/WebSphereCommerce

../BODs/GetPaymentEntity.xsd ">
            <oa:ApplicationArea>
               
<oa:CreationDateTime>2001-12-31T12:00:00</oa:CreationDateTime>
               
<oa:BODID>2001-12-31T12:00:00[wcsadmin]localhost</oa:BODID>
            </oa:ApplicationArea>
            <wc:DataArea>
                <oa:Get>
                    <oa:Expression/>
                </oa:Get>
                <wc:PaymentEntity>
                    <wc:PaymentContext>
                        <wc:ChannelId>-1</wc:ChannelId>
                        <wc:Locale>en_US</wc:Locale>
                        
<wc:PaymentConfigurationGroupId>default</wc:PaymentConfigurationGroupId>
                        <wc:StoreId>10001</wc:StoreId>
                    </wc:PaymentContext>
                    <wc:PaymentInstruction>
                        <wc:Id>14001</wc:Id>
                    </wc:PaymentInstruction>               
</wc:PaymentEntity>
            </wc:DataArea>
        </wc:GetPaymentEntity>
    </soapenv:Body>
</soapenv:Envelope>

Response:


<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header/>
    <soapenv:Body>
        <wc:ShowPaymentEntity releaseID="9.0" versionID="9.1"
            xmlns:oa="http://www.openapplications.org/oagis/9" 
xmlns:wc="http://www.ibm.com/xmlns/prod/WebSphereCommerce">
            <oa:ApplicationArea>
               
<oa:CreationDateTime>2006-01-03T12:55:37</oa:CreationDateTime>
               
<oa:BODID>2006-01-03T12:55:37[wcsadmin]</oa:BODID>
            </oa:ApplicationArea>t;
            <wc:DataArea>
                <oa:Show/>
                <wc:PaymentEntity>
                    <wc:PaymentInstruction>
                        <wc:Id>14001</wc:Id>
                       
<wc:AccountNumber>***********11111</wc:AccountNumber>
                       
<wc:Amount>100.00000</wc:Amount>
                       
<wc:ApprovedAmount>0.00000</wc:ApprovedAmount>
                       
<wc:ApprovingAmount>0.00000</wc:ApprovingAmount>
                       
<wc:CreditedAmount>0.00000</wc:CreditedAmount>
                       
<wc:CreditingAmount>0.00000</wc:CreditingAmount>
                        <wc:Currency>USD</wc:Currency>
                       
<wc:DepositedAmount>0.00000</wc:DepositedAmount>
                       
<wc:DepositingAmount>0.00000</wc:DepositingAmount>
                        <wc:OrderId/>
                        
<wc:PaymentConfigurationId>default</wc:PaymentConfigurationId>
                        
<wc:PaymentSystemName>SimpleOffline</wc:PaymentSystemName>
                       
<wc:Retriable>false</wc:Retriable>
                        
<wc:ReversingApprovedAmount>0.00000</wc:ReversingApprovedAmount>
                        
<wc:ReversingCreditedAmount>0.00000</wc:ReversingCreditedAmount>
                        
<wc:ReversingDepositedAmount>0.00000</wc:ReversingDepositedAmount>
                        <wc:RmaId/>
                        <wc:State>1</wc:State>
                        <wc:StoreId>10001</wc:StoreId>
                       
<wc:TimeCreated>2006-01-03T12:51:55</wc:TimeCreated>
                       
<wc:TimeUpdated>2006-01-03T12:51:56</wc:TimeUpdated>
                        <wc:ExtendedData>
                            <wc:NameValuePair>
                               
<wc:Name>billto_country</wc:Name>
                                <wc:Value>CA</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>billto_stateprovince</wc:Name>
                                <wc:Value>ON</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>billto_address1</wc:Name>
                                <wc:Value>123 Main
Street</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>expire_year</wc:Name>
                               
<wc:Value>2010</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>account</wc:Name>
                               
<wc:Value>***********11111</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>billto_city</wc:Name>
                               
<wc:Value>Toronto</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>billto_zipcode</wc:Name>
                               
<wc:Value>M1M1M1</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>expire_month</wc:Name>
                                <wc:Value>01</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>cc_brand</wc:Name>
                               
<wc:Value>VISA</wc:Value>
                            </wc:NameValuePair>
                            <wc:NameValuePair>
                               
<wc:Name>payment_method</wc:Name>
                               
<wc:Value>VISA</wc:Value>
                            </wc:NameValuePair>
                        </wc:ExtendedData>
                    </wc:PaymentInstruction>
                </wc:PaymentEntity>
            </wc:DataArea>
        </wc:ShowPaymentEntity>
    </soapenv:Body>
</soapenv:Envelope>

WSDL

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

  • WC_eardir/WebSphereCommerceWebServices.jar

Under the following path:

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