|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.payment.commands.DoPaymentMPFCmdImpl
Default DoPayment
task command implementation.
Parameter:
Parameter Name | Type | Descriptions |
orderId | Long | The ID of the Order |
totalAmount | BigDecimal | The Total Amount to be authorized |
policyId | Long | The ID of the Payment Policy to use for the Purchase. |
tcId | Long | The ID of the Payment Term and Condition to use for the Purchase. |
paymentAttributes | TypedProperty | The payment attributes (eor example,.g. all the name-value pairs from the OrderProcess command) |
CheckPaymentAccept
instead and skip the rest
AuthorizeAccountPayment
Task command to see if the Account will accept the charges.
CheckTASpendingLimit
Task command to see if Spending Amount exceeds Limit specified in the Trading Agreement. (Calls this Task Command regardless of the presence of RightToBuyTC by Amount in the Trading Agreement.)
ValidatePONumber
Task command to validate the PO Number if buyerPONumber is specified as one of the paymentAttributes and the common Account ID (of the all the Trading Agreements) is not null.
CheckPOSpendingLimit
Task command to see if the SpendingLimit specified in Limited PO will be exceeded (if a Limited PO is specified for the purchase).
DoPaymentPolicy
command for the Payment Policy specified for the Purchase.
Field Summary | |
static java.lang.String |
APPROVAL_AMOUNT
|
static java.lang.String |
BILLTO_ADDRESS1
|
static java.lang.String |
BILLTO_ADDRESS2
|
static java.lang.String |
BILLTO_CITY
|
static java.lang.String |
BILLTO_COUNTRY
|
static java.lang.String |
BILLTO_COUNTRY_CODE
|
static java.lang.String |
BILLTO_EMAIL_ADDR1
|
static java.lang.String |
BILLTO_FIRSTNAME
|
static java.lang.String |
BILLTO_LASTNAME
|
static java.lang.String |
BILLTO_MIDDLENAME
|
static java.lang.String |
BILLTO_PHONE_NUMBER
|
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 |
CURRENCY_FACTOR
|
static java.lang.String |
LANGUAGE_ENCODING
|
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
|
static java.lang.String |
TOTAL_SHIPPING_AMOUNT
|
static java.lang.String |
TOTAL_TAX_AMOUNT
|
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.payment.commands.DoPaymentCmd |
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 | |
DoPaymentMPFCmdImpl()
|
Method Summary | |
protected AccountAccessBean |
getAccount()
Returns the AccountAccessBean representing the Account if an Account ID is set. |
protected java.lang.Long |
getAccountId()
Returns the common Account ID if one is specified by the Trading Agreements used by the Order items of the Order being processed. |
protected java.lang.Long |
getBuyerPOId()
Returns the internal BuyerPO ID of the Buyer PONumber if it is specified. |
java.lang.String |
getContentType()
Returns the Content Type (or MIME type) of the return data, or null if
the type is not known. |
protected OrderAccessBean |
getOrder()
Returns the OrderAccessBean representing the Order. |
protected java.lang.Long |
getOrderId()
Returns the Order ID of the Order. |
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()
Returns the TypedProperty object containing the payment attributes passed to this command by the calling command. |
protected java.lang.Integer |
getPaymentMethodId()
Returns the payMethodId attribute passed to the command by the caller. |
protected java.lang.Long |
getPolicyId()
Returns the payMethodId attribute passed to the command by the caller. |
protected java.lang.String |
getPONumber()
Returns the PONumber attribute passed to the command by the caller. |
byte[] |
getReturnData()
Returns the byte Array containing Return Data from the Payment Manager. |
protected java.lang.String |
getTcId()
Returns the tcId attribute passed to the command by the caller. |
protected java.math.BigDecimal |
getTotalAmount()
Returns the totalAmount attribute passed to the command by the caller. |
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. |
void |
reset()
Resets the instance variables of the command. |
protected void |
setAccountId(java.lang.Long n)
|
protected void |
setBuyerPOId(java.lang.Long n)
Sets the buyerPOId. |
protected void |
setContentType(java.lang.String sContentType)
|
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)
|
void |
setPolicyId(java.lang.Long n)
Sets the policyId property of the command. |
protected void |
setPONumber(java.lang.String sPONumber)
|
protected void |
setReturnData(byte[] ba)
|
protected void |
setTcId(java.lang.String s)
Sets the tcId property of the command. |
void |
setTotalAmount(java.math.BigDecimal totalAmount)
Sets the totalAmount property of the command. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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, validateParameters |
Field Detail |
public static final java.lang.String APPROVAL_AMOUNT
public static final java.lang.String BILLTO_ADDRESS1
public static final java.lang.String BILLTO_ADDRESS2
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_EMAIL_ADDR1
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_PHONE_NUMBER
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 CURRENCY_FACTOR
public static final java.lang.String LANGUAGE_ENCODING
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
public static final java.lang.String TOTAL_SHIPPING_AMOUNT
public static final java.lang.String TOTAL_TAX_AMOUNT
Constructor Detail |
public DoPaymentMPFCmdImpl()
Method Detail |
protected AccountAccessBean getAccount()
This method will first check if the local variable iabAccount is set. If not set, it will attempt to retrieve the AccountAccessBean using the specified Account ID.
protected java.lang.Long getAccountId()
protected java.lang.Long getBuyerPOId()
public java.lang.String getContentType()
null
if
the type is not known.getContentType
in interface DoPaymentCmd
String
containing the name of the MIME type of the return data,
or null if the type is not knownprotected OrderAccessBean getOrder()
This method will first check if the local variable is set or not. If not set it will attempt to get it by create a new AccessBean.
protected java.lang.Long getOrderId()
public java.lang.String getOrderState()
getOrderState
in interface DoPaymentCmd
protected TypedProperty getPaymentAttributes()
protected java.lang.Integer getPaymentMethodId()
setPaymentAttributes.
protected java.lang.Long getPolicyId()
setPaymentAttributes.
protected java.lang.String getPONumber()
public byte[] getReturnData()
getReturnData
in interface DoPaymentCmd
protected java.lang.String getTcId()
setPaymentAttributes.
protected java.math.BigDecimal getTotalAmount()
setPaymentAttributes.
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class AbstractECCommand
com.ibm.commerce.command.AbstractECCommand
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.public void reset()
This is useful if the command instance is to be called multiple times with different command parameters.
reset
in class AbstractECCommand
protected void setAccountId(java.lang.Long n)
protected void setBuyerPOId(java.lang.Long n)
protected void setContentType(java.lang.String sContentType)
public void setOrderId(java.lang.Long orderId)
setOrderId
in interface DoPaymentCmd
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 DoPaymentCmd
requestProperties
- the TypedProperty object containing all
the parameters to be passed to this command.
Some of the Payment Attributes that may be passed to the command are:
Keyword Value =========== ==================================== tcId ID of the Payment Term and Condition to use policyId ID of the Payayment Policy to use. 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
The first three attributes (tcId, policyId and payMethodId) determines how the payment is to be processed. At least one of the three must be specified and tcId is mandatory if any of the Order items of the Order uses a Trading Agreement that includes Payment Terms and Conditions.
If tcId is specified, policyId and payMethodId are ignored. If tcId is not specified, either policyId or payMethodId must be specified. If policyId is specified, payMethodId is ignored.
The payMethodId attribute is for backward compatibility only. This attribute will only have effect if neither the icId and policyId attributes are present. See the WebSphere Commerce Migration Guide for information.
The cardBrand and cardNumber attributes, if specified, must both be present. Same is true for the cardExpiryMonth and the cardExpiryYear attributes. (The cardBrand attribute must match the BrandID used to configure the Merchant Account if Payment Manager is used. The BrandID is case-sensitive.)
Note: other payment attributes may be specified dependent on the payment method used to process the payment.
public void setPaymentMethodId(java.lang.Integer nPayMthdId)
public void setPolicyId(java.lang.Long n)
n
- The ID of the Payment Policy to be used to process payment
for this Order.protected void setPONumber(java.lang.String sPONumber)
protected void setReturnData(byte[] ba)
protected void setTcId(java.lang.String s)
s
- The ID of the Payment Term and Condition to be used to process payment
for this Order.public void setTotalAmount(java.math.BigDecimal totalAmount)
setTotalAmount
in interface DoPaymentCmd
totalAmount
- the total price of the Order for which payment
is to be processed.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |