Reference > Shop flow URLs > Order Management subsystem URLs > Order payment
PICopy URL
The PICopy URL copies the payment methods from one order to another order.
URL structure
name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />
- http://host_name/path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path.
- 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.
Related concepts
Related reference