Advanced orders PIAdd URL

This URL adds a new payment method to an order. Invocation of this command causes an event-driven payments edit event to occur.

URL structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.
Diagram of the URL structure: the URL starts with the fully qualified name of your WebSphere Commerce Server and the configuration path, followed by the URL name, Advanced orders PIAdd  and the ? character. End the URL with a list of parameters in the form of name value pairs. Separate each name value pair with the & character. For a detailed description of the parameters and their values, refer to the list entitled Parameter values.

Parameter values

orderId
(Required) The identifier of the order to which the payment method is to be added.
URL
(Required) The URL to be called when the command completes successfully.
piAmount
(Required) The amount in the order currency to be used for this payment method. The format of this number must fit the rules for a java.math.BigDecimal object. The number must use a period for a decimal place.
payMethodId
(Required) The payment method identifier. See Payment methods for a list of methods supported by WebSphere Commerce (payment methods are configurable).
protocolData
Additional name-value pairs separated by an ampersand (&) that will be passed to the payment plug-in or payment processor as additional data required by that payment protocol. For example, for a credit card, &cc_brand=AMEX.

Example 1

The following example adds the AMEX credit card payment method to order 112233, for an amount of 105.50 USD, with protocol data values for the credit card account, brand, and expiration. The assumption is that the order already exists and is using USD as the currency.

http://host_name/webapp/wcs/stores/servlet/PIAdd?orderID=112233&piAmount=105.50
&payMethodId=AMEX&URL=/
     &cc_nameoncard=Jane+Smith
     &billto_address1=4911+Sunnybrook+Dr
     &billto_city=Beverly+Hills
     &billto_stateprovide=CA
     &billto_zipcode=90210
     &billto_country=USA
     &account=account_value
     &cc_brand=AMEX
     &expire_month=09
     &expire_year=2005

Example 2

The following example adds the electronic check payment method to order 112233, for an amount of 300 USD, and supplies the check routing number required by that payment method to perform the transaction. The assumption is that the order already exists and is using USD as the currency.

http://host_name/webapp/wcs/stores/servlet/PIAdd?orderID=112233&piAmount=300
&payMethodId=eCheck&URL=/
     &account=account_value
     &check_number=1159
     &check_routing_number=123456789

Behavior

Adds a payment instruction to an existing order. Calls the EditCmd task command to add the payment instruction to the order.

Exception conditions

Feedback