Reference > Shop flow URLs > Order Management subsystem URLs > Order payment
PIEdit URL
This URL changes the details of an existing payment instruction in an order.
URL
PIEdit
Controller command
Implementation class
Commands called
EditUnboundPITaskCmd
EditCmd
URL structure
- http://host_name/path/
name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />
- Parameter values
- orderId
- Required: The identifier of the order for which the payment method is to be changed.
- piId
- Required: The numeric identifier of the payment instruction to modify. The piId can be obtained from the EDPPaymentInstructionsDataBean data bean and represents the combination of the payment method, payment amount, and any protocol data.
- piAmount
- The new amount in the order currency to be used for this payment instruction. The format of this number must fit the rules for a java.math.BigDecimal object. The number must use a period for a decimal place.
- policyId
- (Required if PayMethodId is not specified) The payment policy identifier. It is the primary key of the payment business POLICY table. (Table POLICY with column policytype_id = "Payment").
- payMethodId
- (Required if policyId is not specified) See Payment methods for supported methods.
- protocolData
- Additional name-value pairs separated by an ampersand (&) that will be passed to the payment plug-in or payment processor as additional data required by that payment protocol. If an existing keyword is passed in, the value for the keyword will be overwritten in the payment instruction.
- forceFlag
- The flag to indicate whether the payment method should be edited even though the target amount is less than the authorized amount or there is some deposited amount for the payment method. For these scenarios, tickler will be created to make sure the CSR is notified. The default value is false.
- paymentDataEditable
- The flag indicates whether the payment protocol data should be edited by this request.
- true
- Payment protocol data should be edited by this request. The default value.
- false
- Payment protocol data should not be edited by this request.
- amountEditable
- The flag to indicate whether the payment method amount should be edited by this request. If piAmount parameter is provided and this flag is true, the amount will be edited by this request. The default value is true.
- purchaseOrder_id
- The purchase order number specified to the order. This parameter is optional, if it is set, the value of the purchase order number will send back to the response properties to be displayed in the page.
- errorViewName
- The view name which is redirected to when the execution fails. If this parameter is provided, the default error view name is PaymentInstructionErrorView.
- billing_address_id
- The billing address identifier.
- paymentTCId
- The payment term and condition identifier for this payment instruction. This parameter is used by the business customer.
- valueFromPaymentTCId
- The flag to indicate whether the payment protocol data should be extracted from the payment term and condition identified by paymentTCId paramater and ignore any protocol data passed in the request properties.
- true
- Payment protocol data is extracted.
- false
- The default value. Payment protocol data is not extracted.
- URL
- The URL to be redirected when the command completes successfully.
Example 1
The following example changes the payment amount associated with the AMEX credit card payment method (The payment policy identifier in POLICY table is -9803) for order 112233, to an amount of 75.01 USD for payment instruction 27022.
http://host_name/webapp/wcs/stores/servlet/PIEdit?orderID=112233&piId=27022&piAmount=75.01 &policyID=-9803&URL=/
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 which are not passed by PIEdit will be kept the same as before.
http://host_name/webapp/wcs/stores/servlet/PIEdit?orderID=112233&piID=27023&policyID=-9803 &check_routing_number=999888776&URL=/
Behavior
Check if 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 (An unbound payment instruction for the order only has the information for the payment method and the payment policy):
- Call EditUnboundPITaskCmd (EDP command) to edit the unbound payment instruction
Otherwise:
- Call EditCmd (EDP command ) to edit the payment instruction
- Examine the result of EditCmd and throw exception if the result is null or if there is error in the results.
Exception conditions
- ECSystemException
- ECApplicationException
Related concepts
Related reference