Deprecated feature

PayResetPM URL

This URL 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 by using 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.

URL syntax

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

Parameter values

storeId
The reference number of the store that is associated with this command.
orderId
Required: The 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

  • Resets payment for an order that has failed submission to WebSphere Commerce Payments for processing. Order submission to WebSphere Commerce Payments can fail for the following reasons:
    • Rejected by the Acquirer due to insufficient funds.
    • Rejected by the Acquirer because the card has expired.
  • Returns the WebSphere Commerce order to the "pending" state so that the order can be re-submitted for processing.
  • The URL that is called depends on the reason for failure.
  • The ReverseUpdateInventoryCmd task command can be called to reverse the inventory updated for the Order if needed.
  • The Order Status is updated to "P" if the command runs successfully.

Exception conditions

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