PIAdd URL

This URL adds a new payment method to an order. This controller command will call EditCmd task command to add the payment method.

URL structure

http://host_name/path/

The fully qualified name of your WebSphere Commerce Server and the configuration path.

 

Parameter values

orderId

(Required) The identifier of the order to which the payment method is to be added.

URL

(Required) The URL to be redirected 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.

policyId

The payment policy identifier. It is the primary key of the payment business policy table. (Table POLICY with column policytype_id = 'Payment').

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.

purchaseorder_id

The purchase order number specified to the order.This parameter is optional, if it is set, the value of the purchase order number will send back to the response properties to be displayed in the page.

errorViewName

The view name which is redirected to when the execution fails. If this parameter is provided, the default error view name is PaymentInstructionErrorView.

billing_address_id

The billing address identifier in WebSphere Commerce instance.

paymentTCId

The payment Term&Condition identifier for this payment instruction. This parameter is used by the business customer.

valueFromPaymentTC

The flag to indicate whether the payment protocol data should be extracted from the payment Term&Condition identified by paymentTCId paramter and ignore any protocol data passed in the request properties. The value includes "true" and "false", the default value is "false".

valueFromProfile

The flag to indicate whether the payment protocol data should be extracted from the user's quick checkout profile and ignore any protocol data passed in the request properties. The value includes "T" and "F", the default value is "F".

 

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
&policyID=-9803&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
     &billing_address_id=10001000006363
     &errorViewName=DoPaymentErrorView

 

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
&policyID=-9802&URL=/
     &account=account_value
     &check_number=1159
     &check_routing_number=123456789
     &billing_address_id=10001000006363
     &errorViewName=DoPaymentErrorView

 

Behavior

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

 

Exception conditions