This URL changes the details of an existing payment instruction in an order.
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 for which the payment method is to be changed.
- piId
- (Required) The numeric identifier of the payment instruction to modify. The piId can be obtained from the EDPPaymentInstructionsDataBean data bean and represents the combination of the payment method, payment amount, and any protocol data.
- URL
- The URL to be called when the command completes successfully.
- piAmount
- The new amount in the order currency to be used for this payment instruction. 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
- The payment method identifier.
- 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. If an existing keyword is passed in, the value for the keyword will be overwritten in the payment instruction.
Example 1
The following example changes the payment amount associated with the AMEX credit card payment method for order 112233, to an amount of 75.01 USD for payment instruction 27022.
http://host_name/webapp/wcs/stores/servlet/PIEdit?orderID=112233&piId=27022&piAmount=75.01 &payMethodId=AMEX&URL=/
Example 2
The following example changes the check routing number (due to a typographical error) for an electronic check transaction. Because the check routing number is supplied as protocol data, the &check_routing_number name-value pair is entered.
http://host_name/webapp/wcs/stores/servlet/PIAdd?orderID=112233 &payMethodId=eCheck&check_routing_number=999888776&URL=/
Behavior
Modifies a payment instruction for an existing order:
- Validates that the required parameters are passed: orderId, piId, and URL.
- Changes the EDPPaymentInstruction specified with the data passed in for the payment method ID, the amount, and payment protocol data (protocol data specified as name-value pairs).
- Adds the EDPPaymentInstruction in an empty list.
- Calls the EditCmd task command with the payment method, the total order amount (calculated from total product price, total tax, total shipping, total shipping tax, total adjustment) and the orderId.
- Examines the results of the task command for an error and redirects to an error page. Otherwise, it redirects to the URL that was passed as a parameter.
Exception conditions
- ECSystemException
- ECApplicationException