PIEdit URL

This URL changes the details of an existing payment instruction in an order.


URL

PIEdit


Controller command

PIEditCmd


Implementation class

PIEditCmdImpl

When you run the PIEdit URL with this class, the command cancels the existing payment instruction before the command creates the replacement payment instruction. The new instruction includes all of the new protocol data and the amount or currency, or both. To ensure that the new instruction includes the required payment information, specify all of the parameters for the URL, including the parameters that do not need updating.

Alternatively, we can use another implementation class for the PIEditCmd
com.ibm.commerce.edp.commands.PIEditWithMergingProtocolDataCmdImpl
When you use this class, the payment protocol data that is passed in with the URL is merged with the original data stored in the database. If you do not specify all parameters for the URL, this class uses the data in the database for the missing parameters to update the payment instruction.


Commands called

EditUnboundPITaskCmd

EditCmd


URL structure


Parameter values


Example 1

The following example changes the payment amount associated with the AMEX credit card payment method for order 112233. The payment policy identifier in POLICY table is -9803. The payment amount is changed to an amount of 75.01 USD for payment instruction 27022.


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. The other protocol data that is not passed by PIEdit is kept the same as before.


Behavior

Check whether the order is locked by the current CSR. If the order is not locked and called by a CSR, or if it is locked by another CSR, an exception is thrown If the payment instruction to be edited is unbound, Call EditUnboundPITaskCmd (EDP command) to edit the unbound payment instruction. An unbound payment instruction for the order has only the information for the payment method and the payment policy. Otherwise:


Exception conditions


Related concepts
Payment instructions
Payment methods


Related reference
PIAdd URL
PICopy URL
PIRemove URL