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:
  • Constructor Details

    • POnlinePaymentBeanImpl

      public POnlinePaymentBeanImpl() throws RemoteException
      Creates the controller for the Online Payment Input Form.
      Throws:
      RemoteException
  • Method Details

    • setName

      public void setName(String sName) throws RemoteException
      Sets the value for the Customer Name field.
      Specified by:
      setName in interface POnlinePaymentBean
      Parameters:
      sName - a String with the text to use for the field
      Throws:
      RemoteException
    • setAddress

      public void setAddress(String sAddress) throws RemoteException
      Sets the value for the Customer Address field.
      Specified by:
      setAddress in interface POnlinePaymentBean
      Parameters:
      sAddress - a String with the text to use for the field
      Throws:
      RemoteException
    • setCity

      public void setCity(String sCity) throws RemoteException
      Sets the value for the Customer City field.
      Specified by:
      setCity in interface POnlinePaymentBean
      Parameters:
      sCity - a String with the text to use for the field
      Throws:
      RemoteException
    • setState

      public void setState(String sState) throws RemoteException
      Sets the value for the Customer State field.
      Specified by:
      setState in interface POnlinePaymentBean
      Parameters:
      sState - a String with the text to use for the field
      Throws:
      RemoteException
    • setZip

      public void setZip(String sZip) throws RemoteException
      Sets the value for the Customer ZipCode field.
      Specified by:
      setZip in interface POnlinePaymentBean
      Parameters:
      sZip - a String with the text to use for the field
      Throws:
      RemoteException
    • setCountry

      public void setCountry(String sCountry) throws RemoteException
      Sets the value for the Customer Country field.
      Specified by:
      setCountry in interface POnlinePaymentBean
      Parameters:
      sCountry - a String with the text to use for the field
      Throws:
      RemoteException
    • setAmount

      public void setAmount(String sAmount) throws RemoteException
      Sets the charge value for the Amount field.
      Specified by:
      setAmount in interface POnlinePaymentBean
      Parameters:
      sAmount - a String with the text to use for the field
      Throws:
      RemoteException
    • initAmount

      public void initAmount(String sAmount) throws RemoteException
      Initializes and validates the BigDecimal to use for the Amount field.
      Parameters:
      sAmount - a String with the amount to be charged
      Throws:
      RemoteException - thrown for Infranet errors
    • setDebitNumber

      public void setDebitNumber(String sDebitNumber) throws RemoteException
      Sets the value for the Credit Card number field.
      Specified by:
      setDebitNumber in interface POnlinePaymentBean
      Parameters:
      sDebitNumber - a String with the text to use for the field
      Throws:
      RemoteException
    • setDebitExpiry

      public void setDebitExpiry(String sDebitExpiry) throws RemoteException
      Sets the value for the Credit Card Expiration Date field.
      Specified by:
      setDebitExpiry in interface POnlinePaymentBean
      Parameters:
      sDebitExpiry - a String with the text to use for the field
      Throws:
      RemoteException
    • setDebitSecurityId

      public void setDebitSecurityId(String sDebitSecurityId) throws RemoteException
      Sets the value for the Credit Card Security ID (CVV/CDD) field. This is an optional field.
      Specified by:
      setDebitSecurityId in interface POnlinePaymentBean
      Parameters:
      sDebitSecurityId - a String with the text to use for the field
      Throws:
      RemoteException
    • setMode

      public void setMode(String sMode) throws RemoteException
      Sets the processing mode.
      Specified by:
      setMode in interface POnlinePaymentBean
      Parameters:
      sMode - a String 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 interface POnlinePaymentBean
      Parameters:
      sPaymentResult - an integer representing the result. Corresponds to the opa.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 the opa.charge.resultinvalid input: '<'payment_result> keys in the WebKitResources.properties file, where invalid input: '<'payment_result> is a positive integer.
    • getPaymentResult

      public int getPaymentResult() throws RemoteException
      Gets the value for Payment Result. The returned integer corresponds to the opa.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 interface POnlinePaymentBean
      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 interface POnlinePaymentBean
      Parameters:
      mPaymentResult - an integer representing the result. Corresponds to the opa.charge.resultinvalid input: '<'payment_result_type> keys in the WebKitResources.properties file, where invalid input: '<'payment_result> is a positive integer.
    • getPaymentResultType

      public int getPaymentResultType() throws RemoteException
      Gets the value for Payment Result type. The returned integer corresponds to the opa.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 interface POnlinePaymentBean
      Returns:
      An integer value indicating the payment results;
      Throws:
      RemoteException
    • getName

      public String getName() throws RemoteException
      Gets the value for the Customer Name field.
      Specified by:
      getName in interface POnlinePaymentBean
      Returns:
      A String with the value to use for the field.
      Throws:
      RemoteException
    • getAddress

      public String getAddress() throws RemoteException
      Gets the value for the Customer Address field.
      Specified by:
      getAddress in interface POnlinePaymentBean
      Returns:
      A String with the value to use for the field.
      Throws:
      RemoteException
    • getCity

      public String getCity() throws RemoteException
      Gets the value for the Customer City field.
      Specified by:
      getCity in interface POnlinePaymentBean
      Returns:
      A String with the value to use for the field.
      Throws:
      RemoteException
    • getState

      public String getState() throws RemoteException
      Gets the value for the Customer State field.
      Specified by:
      getState in interface POnlinePaymentBean
      Returns:
      A String with the value to use for the field.
      Throws:
      RemoteException
    • getZip

      public String getZip() throws RemoteException
      Gets the value for the Customer Zip Code field.
      Specified by:
      getZip in interface POnlinePaymentBean
      Returns:
      A String with the value to use for the field.
      Throws:
      RemoteException
    • getCountry

      public String getCountry() throws RemoteException
      Gets the value for the Customer Country field.
      Specified by:
      getCountry in interface POnlinePaymentBean
      Returns:
      A String with the value to use for the field.
      Throws:
      RemoteException
    • update

      public void update(int reason, Object data)
      Used only for BAS Swing clients. Default behavior in this case is to do nothing.
      Specified by:
      update in class PControllerImpl
      Parameters:
      reason - an integer constant that indicates the reason for the update (UPDATE_NEW_MODEL, UPDATE_PROPERTY, UPDATE_MODEL_CHANGE, or UPDATE_CLIENT)
      data - the data associated with update
    • getSelectionDataFor

      public Object getSelectionDataFor(String dataItem, int index)
      Used only for BAS Swing clients. Default behavior in this case is to do nothing and return null.
      Specified by:
      getSelectionDataFor in interface PControllerBean
      Parameters:
      dataItem - the name of a data item. Must match the name of an item changed by sending a PViewDataChangeEvent.
      index - an optional index into an array data item
      Returns:
      Usually, a model handle or array of model handles.
    • onlinepayment

      public void onlinepayment(PModelHandle mH, ResourceBundle bundle) throws RemoteException
      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 interface POnlinePaymentBean
      Parameters:
      mH - the PModelHandle for the account
      bundle - the resource bundle
      Throws:
      RemoteException - thrown for null contexts and invalid payment modes
    • payPaymentScreen

      protected void payPaymentScreen(PCachedContext ctx, PModelHandle mH) throws RemoteException
      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 - the PModelHandle for the account
      Throws:
      RemoteException - thrown for invalid field descriptions
    • initPaymentScreen

      protected void initPaymentScreen(PCachedContext ctx, PModelHandle mH) throws RemoteException
      Retrieves the necessary information about the account and populates the online payment form with default values. For all the bills the values are retrieved from FldNameinfo of PCM_OP_BAL_GET_ACCT_BILLINFO opcode output flist. If the FldNameinfo is empty then the values are retrieved from FldNameInfo of account object
      Parameters:
      ctx - the context to the connection manager (CM)
      mH - the PModelHandle for the account
      Throws:
      RemoteException - thrown for invalid field descriptions
    • processBillinfoArray

      protected void processBillinfoArray(SparseArray billInfoArray) throws RemoteException
      Throws:
      RemoteException
    • getAllBillinfoDetails

      public Hashtable getAllBillinfoDetails()
      Gets the available billinfos for given account.
      Specified by:
      getAllBillinfoDetails in interface POnlinePaymentBean
      Returns:
      A Hashtable of all billinfo details.
    • getBillinfoPoid

      public String getBillinfoPoid()
      Gets the value for the selected Billinfo object field.
      Specified by:
      getBillinfoPoid in interface POnlinePaymentBean
      Returns:
      A String with the value of billinfo poid.
    • setBillinfoPoid

      public void setBillinfoPoid(String sBillinfoPoid)
      Sets the value for the Billinfo object field.
      Specified by:
      setBillinfoPoid in interface POnlinePaymentBean
      Parameters:
      sBillId - a String with he value of billinfo poid.