Package com.portal.web.comp
Class POnlinePaymentBeanImpl
java.lang.Object
com.portal.bas.PControllerImpl
com.portal.web.comp.POnlinePaymentBeanImpl
- All Implemented Interfaces:
PControllerBean,POnlinePaymentBean,Serializable,Remote,Unreferenced
public class POnlinePaymentBeanImpl
extends PControllerImpl
implements POnlinePaymentBean, Serializable
POnlinePaymentBeanImpl is a controller that defines
the values used for the Online Payment Input Form.- Author:
- Senthil Vaiyapuri
- See Also:
-
Field Summary
Fields inherited from class com.portal.bas.PControllerImpl
mFList, mRemoteListeners, UPDATE_CLIENT, UPDATE_MODEL_CHANGE, UPDATE_NEW_MODEL, UPDATE_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionCreates the controller for the Online Payment Input Form. -
Method Summary
Modifier and TypeMethodDescriptionGets the value for the Customer Address field.Gets the available billinfos for given account.Gets the value for the selected Billinfo object field.getCity()Gets the value for the Customer City field.Gets the value for the Customer Country field.getName()Gets the value for the Customer Name field.intGets the value for Payment Result.intGets the value for Payment Result type.getSelectionDataFor(String dataItem, int index) Used only for BASSwingclients.getState()Gets the value for the Customer State field.getZip()Gets the value for the Customer Zip Code field.voidinitAmount(String sAmount) Initializes and validates theBigDecimalto use for the Amount field.protected voidinitPaymentScreen(PCachedContext ctx, PModelHandle mH) Retrieves the necessary information about the account and populates the online payment form with default values.voidonlinepayment(PModelHandle mH, ResourceBundle bundle) The main action method called by the Infranet Servlet.protected voidpayPaymentScreen(PCachedContext ctx, PModelHandle mH) Verifies the input fields on the form.protected voidprocessBillinfoArray(SparseArray billInfoArray) voidsetAddress(String sAddress) Sets the value for the Customer Address field.voidSets the charge value for the Amount field.voidsetBillinfoPoid(String sBillinfoPoid) Sets the value for the Billinfo object field.voidSets the value for the Customer City field.voidsetCountry(String sCountry) Sets the value for the Customer Country field.voidsetDebitExpiry(String sDebitExpiry) Sets the value for the Credit Card Expiration Date field.voidsetDebitNumber(String sDebitNumber) Sets the value for the Credit Card number field.voidsetDebitSecurityId(String sDebitSecurityId) Sets the value for the Credit Card Security ID (CVV/CDD) field.voidSets the processing mode.voidSets the value for the Customer Name field.voidsetPaymentResult(int sPaymentResult) Sets the value to return for Payment Result.voidsetPaymentResultType(int sPaymentResultType) Sets the value to return for Payment Result type.voidSets the value for the Customer State field.voidSets the value for the Customer ZipCode field.voidUsed only for BASSwingclients.Methods inherited from class com.portal.bas.PControllerImpl
addRemoteListener, closeSecContext, createClientException, distributeEventToListeners, fireModelChangeEvent, getAppController, getArrayRange, getContext, getField, getField, getField, getFieldWithRestriction, getFieldWithRestriction, getFieldWithRestriction, getModel, getRemoteListenerHandle, getSecContext, handleDistributeToListener, isLight, register, releaseContext, releaseRemoteListener, removeRemoteListener, setField, setField, setModel, unreferenced
-
Constructor Details
-
POnlinePaymentBeanImpl
Creates the controller for the Online Payment Input Form.- Throws:
RemoteException
-
-
Method Details
-
setName
Sets the value for the Customer Name field.- Specified by:
setNamein interfacePOnlinePaymentBean- Parameters:
sName- aStringwith the text to use for the field- Throws:
RemoteException
-
setAddress
Sets the value for the Customer Address field.- Specified by:
setAddressin interfacePOnlinePaymentBean- Parameters:
sAddress- aStringwith the text to use for the field- Throws:
RemoteException
-
setCity
Sets the value for the Customer City field.- Specified by:
setCityin interfacePOnlinePaymentBean- Parameters:
sCity- aStringwith the text to use for the field- Throws:
RemoteException
-
setState
Sets the value for the Customer State field.- Specified by:
setStatein interfacePOnlinePaymentBean- Parameters:
sState- aStringwith the text to use for the field- Throws:
RemoteException
-
setZip
Sets the value for the Customer ZipCode field.- Specified by:
setZipin interfacePOnlinePaymentBean- Parameters:
sZip- aStringwith the text to use for the field- Throws:
RemoteException
-
setCountry
Sets the value for the Customer Country field.- Specified by:
setCountryin interfacePOnlinePaymentBean- Parameters:
sCountry- aStringwith the text to use for the field- Throws:
RemoteException
-
setAmount
Sets the charge value for the Amount field.- Specified by:
setAmountin interfacePOnlinePaymentBean- Parameters:
sAmount- aStringwith the text to use for the field- Throws:
RemoteException
-
initAmount
Initializes and validates theBigDecimalto use for the Amount field.- Parameters:
sAmount- aStringwith the amount to be charged- Throws:
RemoteException- thrown for Infranet errors
-
setDebitNumber
Sets the value for the Credit Card number field.- Specified by:
setDebitNumberin interfacePOnlinePaymentBean- Parameters:
sDebitNumber- aStringwith the text to use for the field- Throws:
RemoteException
-
setDebitExpiry
Sets the value for the Credit Card Expiration Date field.- Specified by:
setDebitExpiryin interfacePOnlinePaymentBean- Parameters:
sDebitExpiry- aStringwith the text to use for the field- Throws:
RemoteException
-
setDebitSecurityId
Sets the value for the Credit Card Security ID (CVV/CDD) field. This is an optional field.- Specified by:
setDebitSecurityIdin interfacePOnlinePaymentBean- Parameters:
sDebitSecurityId- aStringwith the text to use for the field- Throws:
RemoteException
-
setMode
Sets the processing mode.- Specified by:
setModein interfacePOnlinePaymentBean- Parameters:
sMode- aStringwith the processing mode to use:- "init" initializes the form
- "pay" processes the charge request with values from the form
- Throws:
RemoteException
-
setPaymentResult
public void setPaymentResult(int sPaymentResult) Sets the value to return for Payment Result.- Specified by:
setPaymentResultin interfacePOnlinePaymentBean- Parameters:
sPaymentResult- an integer representing the result. Corresponds to theopa.charge.resultinvalid input: '<'payment_result>keys in the WebKitResources.properties file, where invalid input: '<'payment_result> is a positive integer.mPaymentResult- an integer representing the result. Corresponds to theopa.charge.resultinvalid input: '<'payment_result>keys in the WebKitResources.properties file, where invalid input: '<'payment_result> is a positive integer.
-
getPaymentResult
Gets the value for Payment Result. The returned integer corresponds to theopa.charge.resultinvalid input: '<'payment_result>keys in the WebKitResources.properties file, where invalid input: '<'payment_result> is a positive integer.See the online_payment.jsp file for an example of how this method is invoked.
- Specified by:
getPaymentResultin interfacePOnlinePaymentBean- Returns:
- An integer value indicating the payment results; a value of -1 is returned for failures.
- Throws:
RemoteException
-
setPaymentResultType
public void setPaymentResultType(int sPaymentResultType) Sets the value to return for Payment Result type.- Specified by:
setPaymentResultTypein interfacePOnlinePaymentBean- Parameters:
mPaymentResult- an integer representing the result. Corresponds to theopa.charge.resultinvalid input: '<'payment_result_type>keys in the WebKitResources.properties file, where invalid input: '<'payment_result> is a positive integer.
-
getPaymentResultType
Gets the value for Payment Result type. The returned integer corresponds to theopa.charge.resultinvalid input: '<'payment_result_type>keys in the WebKitResources.properties file, where invalid input: '<'payment_result> is a positive integer.See the online_payment.jsp file for an example of how this method is invoked.
- Specified by:
getPaymentResultTypein interfacePOnlinePaymentBean- Returns:
- An integer value indicating the payment results;
- Throws:
RemoteException
-
getName
Gets the value for the Customer Name field.- Specified by:
getNamein interfacePOnlinePaymentBean- Returns:
- A
Stringwith the value to use for the field. - Throws:
RemoteException
-
getAddress
Gets the value for the Customer Address field.- Specified by:
getAddressin interfacePOnlinePaymentBean- Returns:
- A
Stringwith the value to use for the field. - Throws:
RemoteException
-
getCity
Gets the value for the Customer City field.- Specified by:
getCityin interfacePOnlinePaymentBean- Returns:
- A
Stringwith the value to use for the field. - Throws:
RemoteException
-
getState
Gets the value for the Customer State field.- Specified by:
getStatein interfacePOnlinePaymentBean- Returns:
- A
Stringwith the value to use for the field. - Throws:
RemoteException
-
getZip
Gets the value for the Customer Zip Code field.- Specified by:
getZipin interfacePOnlinePaymentBean- Returns:
- A
Stringwith the value to use for the field. - Throws:
RemoteException
-
getCountry
Gets the value for the Customer Country field.- Specified by:
getCountryin interfacePOnlinePaymentBean- Returns:
- A
Stringwith the value to use for the field. - Throws:
RemoteException
-
update
Used only for BASSwingclients. Default behavior in this case is to do nothing.- Specified by:
updatein classPControllerImpl- Parameters:
reason- an integer constant that indicates the reason for the update (UPDATE_NEW_MODEL,UPDATE_PROPERTY,UPDATE_MODEL_CHANGE, orUPDATE_CLIENT)data- the data associated withupdate
-
getSelectionDataFor
Used only for BASSwingclients. Default behavior in this case is to do nothing and return null.- Specified by:
getSelectionDataForin interfacePControllerBean- Parameters:
dataItem- the name of a data item. Must match the name of an item changed by sending aPViewDataChangeEvent.index- an optional index into an array data item- Returns:
- Usually, a model handle or array of model handles.
-
onlinepayment
The main action method called by the Infranet Servlet. When called initially, this method retrieves the customer information and populates the online payment form with default values. When the form is submitted, this method attempts to do an online payment operation.- Specified by:
onlinepaymentin interfacePOnlinePaymentBean- Parameters:
mH- thePModelHandlefor the accountbundle- the resource bundle- Throws:
RemoteException- thrown for null contexts and invalid payment modes
-
payPaymentScreen
Verifies the input fields on the form. If there are no errors, attempts to charge the credit card for the amount specified by the customer. The result of the charge operation is is displayed to the customer.- Parameters:
ctx- the context to the connection manager (CM)mH- thePModelHandlefor the account- Throws:
RemoteException- thrown for invalid field descriptions
-
initPaymentScreen
Retrieves the necessary information about the account and populates the online payment form with default values. For all the bills the values are retrieved fromFldNameinfoof PCM_OP_BAL_GET_ACCT_BILLINFO opcode output flist. If theFldNameinfois empty then the values are retrieved from FldNameInfo of account object- Parameters:
ctx- the context to the connection manager (CM)mH- thePModelHandlefor the account- Throws:
RemoteException- thrown for invalid field descriptions
-
processBillinfoArray
- Throws:
RemoteException
-
getAllBillinfoDetails
Gets the available billinfos for given account.- Specified by:
getAllBillinfoDetailsin interfacePOnlinePaymentBean- Returns:
- A
Hashtableof all billinfo details.
-
getBillinfoPoid
Gets the value for the selected Billinfo object field.- Specified by:
getBillinfoPoidin interfacePOnlinePaymentBean- Returns:
- A
Stringwith the value of billinfo poid.
-
setBillinfoPoid
Sets the value for the Billinfo object field.- Specified by:
setBillinfoPoidin interfacePOnlinePaymentBean- Parameters:
sBillId- aStringwith he value of billinfo poid.
-