PayResetPM command

This command resets a payment for an order that has been submitted to WebSphere Commerce Payments for processing. Only an order that has failed submission can have its payment reset through this command. If successful, this command returns the WebSphere Commerce order to the "pending" state so that the order can be re-submitted for processing.

Command structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.

Diagram of the command structure: the command starts with the fully qualified name of your WebSphere Commerce Server and the configuration path, followed by the command name, PayResetPM  and the ? character. End the command 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

storeId
The reference number of the store associated with this command.
orderId
(Required) The order reference number for the order having its payment reset.
URL
(Required) The URL to be called when this command completes successfully.

Example

An example where the PayResetPM command could be used is found in the sample JavaServer Pages file, PayStatusPM.jsp, from the WC_installdir/samples/web/payment/ directory.

In the sample JSP file, we would display a button to allow the customer to reset the order if the payment status of the order is PAYMENTSTATE_DECLINED or PAYMENTSTATE_VOID. The redirect URL parameter would be set to the OrderDisplay command so that when the PayResetPM command completes, a list of pending orders owned by the customer would be displayed:

http://host_name/webapp/wcs/stores/PayResetPM?storeId=2066
&orderId=123&URL=OrderDisplay%3Fstatus=P

Behavior

Exception conditions

If the Order is not in the right state this command throws the ECApplicationException specifying the "PayResetErrorView". For information on exceptions conditions, refer to the error codes for PayResetErrorView.