com.ibm.commerce.payment.ppc.commands
Class PaymentProcessFinancialTransactionCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.ControllerCommandImpl
-
- com.ibm.commerce.payment.ppc.commands.PaymentProcessFinancialTransactionCmdImpl
-
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PaymentProcessFinancialTransactionCmd, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class PaymentProcessFinancialTransactionCmdImpl extends ControllerCommandImpl implements PaymentProcessFinancialTransactionCmd
This is the default implementation of thePaymentProcessFinancialTransactionCmd
controller command.Input parameters:
Name XPath Description channelId
ApplicationArea/BusinessContext/ContextData[@name='channelId']
The order channel ID used currently. Mandatory. locale
ApplicationArea/BusinessContext/ContextData[@name='locale']
The locale used currently. Such as: CA, EN, and US and so forth. Mandatory. paymentConfigurationGroupId
DataArea/FinancialTransaction/Payment/PaymentInstruction/PaymentConfigurationID
orDataArea/FinancialTransaction/Credit/PaymentInstruction/PaymentConfigurationID
The current payment configuration group ID. Default it is "default". Optional. If it is not defined in the input parameters, there are two alternatives. 1) If the Payment/Credit ID or the Payment Instruction ID is defined in the input parameters, it will be retrieved from the corresponding Payment Instruction
. 2) If thepaymentMethodName
is defined, it will be retrieved via the configuration in Payment Rules.storeId
DataArea/FinancialTransaction/Payment/PaymentInstruction/StoreID
orDataArea/FinancialTransaction/Credit/PaymentInstruction/StoreID
The current store ID. Optional. If it is not defined in the input parameters, and the Payment/Credit ID or Payment Instruction ID is defined in the input parameters. Then it will be retrieved from the corresponding Payment Instruction
.paymentMethodName
DataArea/FinancialTransaction/Payment/PaymentInstruction/PaymentMethodName
orDataArea/FinancialTransaction/Credit/PaymentInstruction/PaymentMethodName
The payment method name used by current financial transaction. Optional. action
DataArea/FinancialTransaction@type
The financial type of current financial transaction. Possible values include "approve"
,"deposit"
,credit
,reverseApproval
,reverseDeposit
, andreverseCredit
. Mandatory.amount
DataArea/FinancialTransaction/RequestedAmount
The requested amount needs to process of current financial transaction. Mandatory. currency
DataArea/FinancialTransaction/RequestedAmount@currency
The current used by current financial transaction. Mandatory. extendedDataName
DataArea/FinancialTransaction/Payment/PaymentInstruction/ExtendedData@name
The extended data name. Optional. extendedDataValue
DataArea/FinancialTransaction/Payment/PaymentInstruction/ExtendedData@value
The extended data value. Optional. orderId
DataArea/FinancialTransaction/Payment/PaymentInstruction/OrderIdentifier/OrderID
The order ID of current financial transaction. Optional. rmaId
DataArea/FinancialTransaction/Credit/PaymentInstruction/RMAIdentifier/RMAID
The RMA ID of current financial transaction. Optional. paymentSystemName
DataArea/FinancialTransaction/Payment/PaymentInstruction/PaymentSystemName
orDataArea/FinancialTransaction/Credit/PaymentInstruction/PaymentSystemName
The current payment system name. Optional. If it is not defined in the input parameters, there are two alternatives. 1) If the Payment/Credit ID or the Payment Instruction ID is defined in the input parameters, it will be retrieved from the corresponding Payment Instruction
. 2) If thepaymentMethodName
is defined, it will be retrieved via the configuration in Payment Rules.paymentId
orcreditId
DataArea/FinancialTransaction/Payment/PaymentIdentifier/PaymentID
orDataArea/FinancialTransaction/Credit/PaymentIdentifier/CreditID
The Payment ID of current financial transaction. Optional. paymentInstructionId
DataArea/FinancialTransaction/Payment/PaymentInstruction/PaymentInstructionIdentifier/PaymentInstructionID
The Payment Instruction ID of current financial transaction. Optional. Response view:
- View: AcknowledgeFinancialTransaction(WebServices/OAGIS/9.0/BODs/AcknowledgePaymentInstruction.jsp)
- Error view: AcknowledgeFinancialTransaction(WebServices/OAGIS/9.0/BODs/AcknowledgePaymentInstruction.jsp)
Behaviour:
- If there is no Payment Instruction created previously, then this command creates a new Payment Instruction for this financial transaction.
- Call the corresponding APIs of WebSphere Commerce Payments to execute the financial transaction.
- Put the financial transaction value object with execution result into the response properties.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
CLASSNAME
The name of this command is "com.ibm.commerce.payment.ppc.commands.PaymentProcessFinancialTransactionCmdImpl".static java.lang.String
COPYRIGHT
The internal copyright field.-
Fields inherited from interface com.ibm.commerce.payment.ppc.commands.PaymentProcessFinancialTransactionCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description PaymentProcessFinancialTransactionCmdImpl()
This is the class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.String
getChannelId(java.lang.Integer i)
This method returns input parameter channel id with enumeration group i.java.util.Locale
getLocale(java.lang.Integer i)
This method returns input parameter locale with enumeration group i.java.lang.String
getOrderId(java.lang.Integer i)
This method returns input parameter order id with enumeration group i.java.lang.String
getPaymentConfigurationGroupId(java.lang.Integer i)
This method returns input parameter payment configuration group id with enumeration group i.java.lang.String
getPaymentMethodName(java.lang.Integer i)
This method returns input parameter payment method name with enumeration group i.AccessVector
getResources()
This method returns command resources for access control.java.lang.String
getRMAId(java.lang.Integer i)
This method returns input parameter RMA id with enumeration group i.java.lang.Integer
getStoreId(java.lang.Integer i)
This method returns input parameter store id with enumeration group i.void
performExecute()
This method contains the actual business logic of the command as per the WebSphere Commerce command framework.It calls WebSphere Commerce Payments to process payment actions.void
reset()
This method resets the command fields.void
setRequestProperties(TypedProperty reqProperties)
This method sets the input parameters from the request properties.void
validateParameters()
This method verifies that required input parameters are present and correct.-
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
The internal copyright field.- See Also:
- Constant Field Values
-
CLASSNAME
public static final java.lang.String CLASSNAME
The name of this command is "com.ibm.commerce.payment.ppc.commands.PaymentProcessFinancialTransactionCmdImpl".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PaymentProcessFinancialTransactionCmdImpl
public PaymentProcessFinancialTransactionCmdImpl()
This is the class constructor.
-
-
Method Detail
-
setRequestProperties
public void setRequestProperties(TypedProperty reqProperties) throws ECException
This method sets the input parameters from the request properties.- Specified by:
setRequestProperties
in interfaceControllerCommand
- Overrides:
setRequestProperties
in classControllerCommandImpl
- Parameters:
reqProperties
- The input parameters from the request properties- Throws:
ECException
- if something fails
-
performExecute
public void performExecute() throws ECException
This method contains the actual business logic of the command as per the WebSphere Commerce command framework.It calls WebSphere Commerce Payments to process payment actions.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
- if something fails
-
validateParameters
public void validateParameters() throws ECException
This method verifies that required input parameters are present and correct.- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECException
- If something input is invalid or missing
-
getResources
public AccessVector getResources() throws ECException
This method returns command resources for access control.- Specified by:
getResources
in interfaceECCommand
- Overrides:
getResources
in classAbstractECTargetableCommand
- Returns:
- An
AccessVector
object containing the StoreAccessBean - Throws:
ECException
- For a failure to obtain the StoreAccessBean
-
getChannelId
public java.lang.String getChannelId(java.lang.Integer i)
This method returns input parameter channel id with enumeration group i.- Parameters:
i
- The index that the channel id locates at- Returns:
- The input parameter channel id with enumeration group i
-
getLocale
public java.util.Locale getLocale(java.lang.Integer i)
This method returns input parameter locale with enumeration group i.- Parameters:
i
- The index that the locale locates at- Returns:
- The input parameter locale with enumeration group i
-
getOrderId
public java.lang.String getOrderId(java.lang.Integer i)
This method returns input parameter order id with enumeration group i.- Parameters:
i
- The index that the order id locates at- Returns:
- The input parameter order id with enumeration group i
-
getRMAId
public java.lang.String getRMAId(java.lang.Integer i)
This method returns input parameter RMA id with enumeration group i.- Parameters:
i
- The index that the RMA id locates at- Returns:
- The input parameter RMA id with enumeration group i
-
getPaymentConfigurationGroupId
public java.lang.String getPaymentConfigurationGroupId(java.lang.Integer i)
This method returns input parameter payment configuration group id with enumeration group i.- Parameters:
i
- The index that the payment configuration id locates at- Returns:
- The input parameter payment configuration group with enumeration group i
-
getStoreId
public java.lang.Integer getStoreId(java.lang.Integer i)
This method returns input parameter store id with enumeration group i.- Parameters:
i
- The index that the store id locates at- Returns:
- The input parameter store id with enumeration group i
-
getPaymentMethodName
public java.lang.String getPaymentMethodName(java.lang.Integer i)
This method returns input parameter payment method name with enumeration group i.- Parameters:
i
- The index that the payment method name locates at- Returns:
- The input parameter payment method name enumeration group i
-
reset
public void reset()
This method resets the command fields.
After this method is invoked, and proper attributes are set, the command can be executed again.
- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
-