|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.commerce.payment.commands.DoPaymentMPFInternalCmdImpl
This DoPaymentMPFInternalCmd
Task Command Implementation is called by
the DoPaymentMPFCmdImpl
Task Command to process payment
for an order using the WebSphere Payment Manager when the payMethodId url parameter
was specified with the OrderProcess command. This Task Command Implementation is a
renamed version of the original DoPaymentMPFCmdImpl class and is mainly for backward
compatibility. It does not support any of the new function introduced with WCBE.
This DoPaymentMPFInternalCmd
implementation class is independent of the Payment Manager
cassette that would be used to process the payment for the order. It uses the
Cashier profile specified by the payMethodId parameter
to direct the Cashier to gather parameters needed by the
Payment Manager cassette. This command implementation supports both non-Wallet
based Payment Manager Cassettes and Wallet-based Payment Manager Cassettes.
If the command is successful, the OrderProcessCmd
will set the Order
status to the value specified by this command.
If unsuccessful, the command throws the ECApplicationException specifying an Error Code and the Error View named by the com.ibm.commerce.DoPaymentCmd.ERROR_TASK_NAME.
The DoPaymentMPFInternalCmdImpl
class may
result in non-empty returnData for the OrderProcessCmd
dependent on the Cassette.
Field Summary | |
static java.lang.String |
BILLTO_ADDRESS1
|
static java.lang.String |
BILLTO_CITY
|
static java.lang.String |
BILLTO_COUNTRY
|
static java.lang.String |
BILLTO_COUNTRY_CODE
|
static java.lang.String |
BILLTO_FIRSTNAME
|
static java.lang.String |
BILLTO_LASTNAME
|
static java.lang.String |
BILLTO_MIDDLENAME
|
static java.lang.String |
BILLTO_STATE
|
static java.lang.String |
BILLTO_ZIPCODE
|
static java.lang.String |
BUYER_LANGUAGE_ID
|
static java.lang.String |
CARD_EXPIRY
|
static java.lang.String |
CARD_NUMBER
|
static java.lang.String |
CURRENCY_ALPHA_CODE
|
static java.lang.String |
PAYMTHD_PSRVR
|
static java.lang.String |
PAYMTHD_SET
|
static int |
PRC_DUPLICATE_OBJECT
|
static int |
SRC_CONNECTION_TO_PM_FAILED
|
static int |
SRC_INITIALIZATION_MESSAGE
|
static int |
SRC_ORDER
|
static int |
SRC_USER_NOT_AUTHORIZED
|
Fields inherited from interface com.ibm.commerce.payment.commands.DoPaymentMPFInternalCmd |
CC_VALID_Y_RANGE, COPYRIGHT, defaultCommandClassName, ERR_CODE_BAD_CCNUM, ERR_CODE_BAD_SYS, ERR_CODE_BAD_XDATE, ERR_CODE_MISSING_PARAM, ERRTASK_NAME, MESSAGE_FOR_BUYER, NAME, NVP_FIELD, PM_MESSAGE_FOR_BUYER, PM_MESSAGE_FOR_MERCHANT, PM_PRIMARY_RC, PM_SECONDARY_RC, WCSHOSTNAME, WCSWEBSERVERPORT, WEBPATH |
Constructor Summary | |
DoPaymentMPFInternalCmdImpl()
|
Method Summary | |
protected void |
checkParameters()
Checks the validity of customer-supplied parameters. |
java.lang.String |
getContentType()
Returns the Content Type (or MIME type) of the return data, or null if
the type is not known. |
protected java.lang.String |
getCurrencyExponent()
|
protected java.lang.String |
getDisplayPaymentStateForTrace(int anPaymentState)
Returns the display String represnting the Payment State as returned by Payment Manager for Trace purposes. |
protected java.lang.String |
getNumericCountryCode(java.lang.String productVendor,
java.lang.String country)
Returns the numeric country/region code for the specified country/region as specified by the product/vendor in the Country Code Table (COUNTCODE). |
protected java.lang.String |
getNumericCurrencyCode()
|
protected OrderAccessBean |
getOrderAccessBean()
This method will first check if the local variable is set or not. |
protected java.lang.Long |
getOrderId()
|
java.lang.String |
getOrderState()
Returns the single character String value that the called command wants the Calling command to use to set the Status of the order. |
protected TypedProperty |
getPaymentAttributes()
|
protected java.lang.Integer |
getPaymentMethodId()
|
protected java.math.BigInteger |
getPMTotalAmount()
|
protected java.lang.String |
getProfileName()
|
byte[] |
getReturnData()
Returns the byte Array containing Return Data from the Payment Manager. |
protected java.math.BigDecimal |
getTotalAmount()
|
boolean |
isReadyToCallExecute()
This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command. |
void |
performExecute()
Performs the main business logic of the command. |
java.util.Hashtable |
query(java.lang.String queryString)
The Cashier calls this method to construct a Hashtable of keywords and values which result from processing the input query string. |
void |
reset()
Resets the instance variables of the command. |
protected void |
setContentType(java.lang.String sContentType)
|
protected void |
setCurrencyExponent(java.lang.String astrCurrencyExponent)
|
protected void |
setNumericCurrencyCode(java.lang.String astrCurrencyCode)
|
protected void |
setOrderAccessBean(OrderAccessBean abOrder)
|
void |
setOrderId(java.lang.Long orderId)
Sets the orderId property of the command. |
protected void |
setOrderState(java.lang.String orderState)
|
void |
setPaymentAttributes(TypedProperty paymentAttributes)
Sets the paymentAttributes property of the command. |
void |
setPaymentMethodId(java.lang.Integer nPayMthdId)
|
protected void |
setPMTotalAmount(java.math.BigInteger biPMTotalAmount)
|
protected void |
setProfileName(java.lang.String strProfileName)
|
protected void |
setReturnData(byte[] ba)
|
void |
setTotalAmount(java.math.BigDecimal totalAmount)
Sets the totalAmount property of the command. |
protected void |
setupNumericCurrencyCodeAndPMTotalAmount()
|
protected void |
setupProfileName(java.lang.Integer nStoreId,
java.lang.Integer nPayMthdId)
|
protected void |
updateOrderPaymentMethod()
|
protected void |
updatePaymentStatus()
|
void |
validateParameters()
Checks the validity of customer-supplied parameters. |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Field Detail |
public static final java.lang.String BILLTO_ADDRESS1
public static final java.lang.String BILLTO_CITY
public static final java.lang.String BILLTO_COUNTRY
public static final java.lang.String BILLTO_COUNTRY_CODE
public static final java.lang.String BILLTO_FIRSTNAME
public static final java.lang.String BILLTO_LASTNAME
public static final java.lang.String BILLTO_MIDDLENAME
public static final java.lang.String BILLTO_STATE
public static final java.lang.String BILLTO_ZIPCODE
public static final java.lang.String BUYER_LANGUAGE_ID
public static final java.lang.String CARD_EXPIRY
public static final java.lang.String CARD_NUMBER
public static final java.lang.String CURRENCY_ALPHA_CODE
public static final java.lang.String PAYMTHD_PSRVR
public static final java.lang.String PAYMTHD_SET
public static final int PRC_DUPLICATE_OBJECT
public static final int SRC_CONNECTION_TO_PM_FAILED
public static final int SRC_INITIALIZATION_MESSAGE
public static final int SRC_ORDER
public static final int SRC_USER_NOT_AUTHORIZED
Constructor Detail |
public DoPaymentMPFInternalCmdImpl()
Method Detail |
protected void checkParameters() throws ECException
public java.lang.String getContentType()
null
if
the type is not known.getContentType
in interface DoPaymentMPFInternalCmd
String
containing the name of the MIME type of the return data,
or null if the type is not knownprotected java.lang.String getCurrencyExponent()
protected java.lang.String getDisplayPaymentStateForTrace(int anPaymentState)
anPaymentState
- the numeric payment state from Payment Manager.protected java.lang.String getNumericCountryCode(java.lang.String productVendor, java.lang.String country) throws ECException
ECException
- protected java.lang.String getNumericCurrencyCode()
protected OrderAccessBean getOrderAccessBean()
protected java.lang.Long getOrderId()
public java.lang.String getOrderState()
getOrderState
in interface DoPaymentMPFInternalCmd
protected TypedProperty getPaymentAttributes()
protected java.lang.Integer getPaymentMethodId()
protected java.math.BigInteger getPMTotalAmount()
protected java.lang.String getProfileName()
public byte[] getReturnData()
getReturnData
in interface DoPaymentMPFInternalCmd
protected java.math.BigDecimal getTotalAmount()
public boolean isReadyToCallExecute()
public void performExecute() throws ECException
performExecute
in interface ECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.public java.util.Hashtable query(java.lang.String queryString) throws com.ibm.commerce.payment.commands.CashierException
This method is defined by the com.ibm.etill.cashier.Queryable interface.
queryString
- a SelectStatement element from a Cashier profilecom.ibm.commerce.payment.commands.CashierException
- if there is an error creating and populating the
result Hashtable.public void reset()
This is useful if the command instance is to be called multiple times with different command parameters.
protected void setContentType(java.lang.String sContentType)
protected void setCurrencyExponent(java.lang.String astrCurrencyExponent)
protected void setNumericCurrencyCode(java.lang.String astrCurrencyCode)
protected void setOrderAccessBean(OrderAccessBean abOrder)
public void setOrderId(java.lang.Long orderId)
DoPaymentMPFInternalCmd
setOrderId
in interface DoPaymentMPFInternalCmd
com.ibm.commerce.payment.commands.DoPaymentMPFInternalCmd
orderId
- the order reference number of the Order for which payment
is to be processed.protected void setOrderState(java.lang.String orderState)
public void setPaymentAttributes(TypedProperty paymentAttributes)
setPaymentAttributes
in interface DoPaymentMPFInternalCmd
requestProperties
- the requestProperties object that contains all
the command parameters are to be passed to this command.
Some of the Payment Attributes that may be passed to the command are:
Keyword Value =========== ==================================== payMethodId PayMthd_Id of the Cashier Profile to use cardBrand The credit card brand. cardNumber The credit card number cardExpiryMonth The credit card exipration month cardExpiryYear The credit card exipration year $XXXXXX Protocol Data Value for $XXXXXXwhere $XXXXXX are special Protocol Data Keyword defined by the Payment Manager Cassette. (The Protocol Data keywords all start with the "$" character.)
For this command, the payMethodId attribute is mandatory. The cardBrand and cardNumber attributes, if specified, must both be present. Same is true for the cardExpiryMonth and the cardExpiryYear attributes.
Note: The cardBrand attribute must match the BrandID used to configure the Merchant Account in the Payment Manager. The BrandID is case-sensitive.
public void setPaymentMethodId(java.lang.Integer nPayMthdId)
protected void setPMTotalAmount(java.math.BigInteger biPMTotalAmount)
protected void setProfileName(java.lang.String strProfileName)
protected void setReturnData(byte[] ba)
public void setTotalAmount(java.math.BigDecimal totalAmount)
setTotalAmount
in interface DoPaymentMPFInternalCmd
totalAmount
- the total price of the Order for which payment
is to be processed.protected void setupNumericCurrencyCodeAndPMTotalAmount() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected void setupProfileName(java.lang.Integer nStoreId, java.lang.Integer nPayMthdId) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected void updateOrderPaymentMethod() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException
protected void updatePaymentStatus() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
com.ibm.commerce.command.ECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |