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.int
Gets the value for Payment Result.int
Gets the value for Payment Result type.getSelectionDataFor
(String dataItem, int index) Used only for BASSwing
clients.getState()
Gets the value for the Customer State field.getZip()
Gets the value for the Customer Zip Code field.void
initAmount
(String sAmount) Initializes and validates theBigDecimal
to use for the Amount field.protected void
initPaymentScreen
(PCachedContext ctx, PModelHandle mH) Retrieves the necessary information about the account and populates the online payment form with default values.void
onlinepayment
(PModelHandle mH, ResourceBundle bundle) The main action method called by the Infranet Servlet.protected void
payPaymentScreen
(PCachedContext ctx, PModelHandle mH) Verifies the input fields on the form.protected void
processBillinfoArray
(SparseArray billInfoArray) void
setAddress
(String sAddress) Sets the value for the Customer Address field.void
Sets the charge value for the Amount field.void
setBillinfoPoid
(String sBillinfoPoid) Sets the value for the Billinfo object field.void
Sets the value for the Customer City field.void
setCountry
(String sCountry) Sets the value for the Customer Country field.void
setDebitExpiry
(String sDebitExpiry) Sets the value for the Credit Card Expiration Date field.void
setDebitNumber
(String sDebitNumber) Sets the value for the Credit Card number field.void
setDebitSecurityId
(String sDebitSecurityId) Sets the value for the Credit Card Security ID (CVV/CDD) field.void
Sets the processing mode.void
Sets the value for the Customer Name field.void
setPaymentResult
(int sPaymentResult) Sets the value to return for Payment Result.void
setPaymentResultType
(int sPaymentResultType) Sets the value to return for Payment Result type.void
Sets the value for the Customer State field.void
Sets the value for the Customer ZipCode field.void
Used only for BASSwing
clients.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:
setName
in interfacePOnlinePaymentBean
- Parameters:
sName
- aString
with the text to use for the field- Throws:
RemoteException
-
setAddress
Sets the value for the Customer Address field.- Specified by:
setAddress
in interfacePOnlinePaymentBean
- Parameters:
sAddress
- aString
with the text to use for the field- Throws:
RemoteException
-
setCity
Sets the value for the Customer City field.- Specified by:
setCity
in interfacePOnlinePaymentBean
- Parameters:
sCity
- aString
with the text to use for the field- Throws:
RemoteException
-
setState
Sets the value for the Customer State field.- Specified by:
setState
in interfacePOnlinePaymentBean
- Parameters:
sState
- aString
with the text to use for the field- Throws:
RemoteException
-
setZip
Sets the value for the Customer ZipCode field.- Specified by:
setZip
in interfacePOnlinePaymentBean
- Parameters:
sZip
- aString
with the text to use for the field- Throws:
RemoteException
-
setCountry
Sets the value for the Customer Country field.- Specified by:
setCountry
in interfacePOnlinePaymentBean
- Parameters:
sCountry
- aString
with the text to use for the field- Throws:
RemoteException
-
setAmount
Sets the charge value for the Amount field.- Specified by:
setAmount
in interfacePOnlinePaymentBean
- Parameters:
sAmount
- aString
with the text to use for the field- Throws:
RemoteException
-
initAmount
Initializes and validates theBigDecimal
to use for the Amount field.- Parameters:
sAmount
- aString
with the amount to be charged- Throws:
RemoteException
- thrown for Infranet errors
-
setDebitNumber
Sets the value for the Credit Card number field.- Specified by:
setDebitNumber
in interfacePOnlinePaymentBean
- Parameters:
sDebitNumber
- aString
with the text to use for the field- Throws:
RemoteException
-
setDebitExpiry
Sets the value for the Credit Card Expiration Date field.- Specified by:
setDebitExpiry
in interfacePOnlinePaymentBean
- Parameters:
sDebitExpiry
- aString
with 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:
setDebitSecurityId
in interfacePOnlinePaymentBean
- Parameters:
sDebitSecurityId
- aString
with the text to use for the field- Throws:
RemoteException
-
setMode
Sets the processing mode.- Specified by:
setMode
in interfacePOnlinePaymentBean
- Parameters:
sMode
- aString
with 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:
setPaymentResult
in 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:
getPaymentResult
in 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:
setPaymentResultType
in 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:
getPaymentResultType
in interfacePOnlinePaymentBean
- Returns:
- An integer value indicating the payment results;
- Throws:
RemoteException
-
getName
Gets the value for the Customer Name field.- Specified by:
getName
in interfacePOnlinePaymentBean
- Returns:
- A
String
with the value to use for the field. - Throws:
RemoteException
-
getAddress
Gets the value for the Customer Address field.- Specified by:
getAddress
in interfacePOnlinePaymentBean
- Returns:
- A
String
with the value to use for the field. - Throws:
RemoteException
-
getCity
Gets the value for the Customer City field.- Specified by:
getCity
in interfacePOnlinePaymentBean
- Returns:
- A
String
with the value to use for the field. - Throws:
RemoteException
-
getState
Gets the value for the Customer State field.- Specified by:
getState
in interfacePOnlinePaymentBean
- Returns:
- A
String
with the value to use for the field. - Throws:
RemoteException
-
getZip
Gets the value for the Customer Zip Code field.- Specified by:
getZip
in interfacePOnlinePaymentBean
- Returns:
- A
String
with the value to use for the field. - Throws:
RemoteException
-
getCountry
Gets the value for the Customer Country field.- Specified by:
getCountry
in interfacePOnlinePaymentBean
- Returns:
- A
String
with the value to use for the field. - Throws:
RemoteException
-
update
Used only for BASSwing
clients. Default behavior in this case is to do nothing.- Specified by:
update
in 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 BASSwing
clients. Default behavior in this case is to do nothing and return null.- Specified by:
getSelectionDataFor
in 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:
onlinepayment
in interfacePOnlinePaymentBean
- Parameters:
mH
- thePModelHandle
for 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
- thePModelHandle
for 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 fromFldNameinfo
of PCM_OP_BAL_GET_ACCT_BILLINFO opcode output flist. If theFldNameinfo
is empty then the values are retrieved from FldNameInfo of account object- Parameters:
ctx
- the context to the connection manager (CM)mH
- thePModelHandle
for the account- Throws:
RemoteException
- thrown for invalid field descriptions
-
processBillinfoArray
- Throws:
RemoteException
-
getAllBillinfoDetails
Gets the available billinfos for given account.- Specified by:
getAllBillinfoDetails
in interfacePOnlinePaymentBean
- Returns:
- A
Hashtable
of all billinfo details.
-
getBillinfoPoid
Gets the value for the selected Billinfo object field.- Specified by:
getBillinfoPoid
in interfacePOnlinePaymentBean
- Returns:
- A
String
with the value of billinfo poid.
-
setBillinfoPoid
Sets the value for the Billinfo object field.- Specified by:
setBillinfoPoid
in interfacePOnlinePaymentBean
- Parameters:
sBillId
- aString
with he value of billinfo poid.
-