PIEdit URL
This URL changes the details of an existing payment instruction in an order.
URL structure
- http://host_name/path/
- The fully qualified name of your WebSphere Commerce Server and the configuration path.
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.
- URL
- The URL to be redirected when the command completes successfully.
- 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
- The payment policy identifier. It is the primary key of the payment business policy table. (Table POLICY with column policytype_id = 'Payment').
- See Payment methods for a list of methods supported by WebSphere Commerce (payment methods are configurable).
- 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 to indicae whether the payment protocol data should be edited by this request. "true" means the payment protocol data should be edited by this request. The default value is "true"
- 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 in WebSphere Commerce instance.
- paymentTCId
- The payment Term&Condition identifier for this payment instruction. This parameter is used by the business customer.
- valueFromPaymentTC
- The flag to indicate whether the payment protocol data should be extracted from the payment Term&Condition identified by paymentTCId paramter and ignore any protocol data passed in the request properties. The value includes "true" and "false", the default value is "false".
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
Modifies a payment instruction for an existing order:
- Validates that the required parameters are passed: orderId, piId, policy_id or payMethodId, and URL.
- Check if the order is locked by other CSR, throw exception if it is locked. If the order is not locked and this requestion is called by CSR, lock the order object.
- Changes the EDPPaymentInstruction specified with the data passed in for the payment method ID, the amount, and payment protocol data (protocol data specified as name-value pairs) by checking the paymentDataEditable and amountEditable flag.
- Adds the EDPPaymentInstruction in an empty list.
- Calls the EditCmd task command with the payment method, the total order amount (calculated from total product price, total tax, total shipping, total shipping tax, total adjustment), the ordered and the force change flag.
- Examines the results of the task command for an error and redirects to an error page. Otherwise, it redirects to the URL that was passed as a parameter.
Exception conditions
- ECSystemException
- ECApplicationException
(C) Copyright IBM Corporation 1996, 2006. All Rights Reserved.