Class PaymentFormCreditCard

java.lang.Object
org.compiere.grid.PaymentForm
org.compiere.grid.PaymentFormCreditCard
All Implemented Interfaces:
IPaymentForm
Direct Known Subclasses:
WPaymentFormCreditCard

public abstract class PaymentFormCreditCard extends PaymentForm
Author:
Elaine
  • Field Details

    • m_C_Payment_ID

      protected int m_C_Payment_ID
      Start Payment
    • m_mPayment

      protected MPayment m_mPayment
    • m_mPaymentOriginal

      protected MPayment m_mPaymentOriginal
    • m_mPaymentTransaction

      protected MPaymentTransaction m_mPaymentTransaction
    • m_CCType

      protected String m_CCType
      Start CreditCard
    • selectedCreditCard

      protected ValueNamePair selectedCreditCard
    • processMsg

      protected String processMsg
  • Constructor Details

    • PaymentFormCreditCard

      public PaymentFormCreditCard(int windowNo, GridTab mTab)
      Parameters:
      windowNo -
      mTab -
  • Method Details

    • loadData

      public void loadData()
      Description copied from interface: IPaymentForm
      Load payment and related transaction records. Usually call from dynInit()
    • getCreditCardList

      public ValueNamePair[] getCreditCardList()
      Returns:
      list of accepted credit card types
    • saveChanges

      public boolean saveChanges()
      Description copied from interface: IPaymentForm
      Save Changes
      Specified by:
      saveChanges in interface IPaymentForm
      Overrides:
      saveChanges in class PaymentForm
      Returns:
      true, if Window can exit
    • save

      public boolean save(String CCType, String CCNumber, String CCExp, BigDecimal amount, String trxName)
      Parameters:
      CCType - credit card type
      CCNumber - credit card number
      CCExp - credit card expire date
      amount - ignore
      trxName -
      Returns:
      true if save successfully
    • afterSave

      protected void afterSave(boolean success)
      Description copied from class: PaymentForm
      after save and trx committed/rollback
      Specified by:
      afterSave in class PaymentForm
    • processOnline

      public boolean processOnline(String CCType, String CCNumber, String CCVV, String CCExp)
      Parameters:
      CCType - credit card type
      CCNumber - credit card number
      CCVV - credit card ccv
      CCExp - credit card expire date
      Returns:
      true if process successfully
    • processOnline

      public boolean processOnline(String CCType, String CCNumber, String CCVV, String CCExp, int C_PaymentProcessor_ID, String trxName)
      Parameters:
      CCType - credit card type
      CCNumber - credit card number
      CCVV - credit card ccv
      CCExp - credit card expire date
      C_PaymentProcessor_ID - optional payment processor id. use the first configure if this is 0
      trxName - optional trx name
      Returns:
      true if process successfully
    • isBankAccountProcessorExist

      public boolean isBankAccountProcessorExist(String CCType, BigDecimal PayAmt)
      Parameters:
      CCType -
      PayAmt -
      Returns:
      true if online payment processor have been configured for tender type credit card
    • getBankAccountProcessor

      public MBankAccountProcessor getBankAccountProcessor(String CCType, BigDecimal PayAmt)
      Get online payment processor configuration for tender type credit card
      Parameters:
      CCType -
      PayAmt -
      Returns:
      MBankAccountProcessor
    • isApproved

      public boolean isApproved()
      Specified by:
      isApproved in interface IPaymentForm
      Overrides:
      isApproved in class PaymentForm
      Returns:
      true if payment transaction have been approved by payment gateway
    • validateCreditCard

      public String validateCreditCard(String CCType, String CCNumber, String CCVV, String CCExp, int C_BP_BankAccount_ID, String CustomerPaymentProfileID) throws IllegalArgumentException
      Parameters:
      CCType - credit card type
      CCNumber - credit card number
      CCVV - credit card ccv
      CCExp - credit card expire
      C_BP_BankAccount_ID -
      CustomerPaymentProfileID -
      Returns:
      error message if credit card doesn't pass validation
      Throws:
      IllegalArgumentException