PICopy URL

The PICopy URL copies the payment methods from one order to another order.

URL structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.
This diagram displays the structure for the PICopy URL.

Parameter values

orderId
Required: The identifier of the order from which payment methods should be copied (the source order).
toOrderId
Required: The identifier of the order that should receive the copied payment method (the target order).
URL
Required: The URL to be called when the command completes successfully.

Example

The following example copies all the payment methods from order 112233 to order 112234.

http://host_name/webapp/wcs/stores/servlet/PICopy?orderId=112233&toOrderId=112234&URL=/     

Behavior

  • Validates that the required parameters are passed: orderId, toOrderId, and URL.
  • Queries payment methods from the order with identifier specified by OrderId by invoking the queryPICmd task command.
  • Calls the EditCmd task command with the list of active payment methods obtained, the total order amount (calculated from all the payment methods) and the orderId.

Exception conditions

  • ECApplicationException is thrown if the Payment rules engine cannot be used to query payment methods from the source order or cannot add payment methods to the target order.