Package org.compiere.grid
Class PaymentFormCreditCard
java.lang.Object
org.compiere.grid.PaymentForm
org.compiere.grid.PaymentFormCreditCard
- All Implemented Interfaces:
IPaymentForm
- Direct Known Subclasses:
WPaymentFormCreditCard
Payment form for credit card tender type
- Author:
- Elaine
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intStart Paymentprotected StringStart CreditCardprotected MPaymentprotected MPaymentprotected MPaymentTransactionprotected Stringprotected ValueNamePairFields inherited from class org.compiere.grid.PaymentForm
log, m_AD_Client_ID, m_AD_Org_ID, m_Amount, m_C_BPartner_ID, m_C_Currency_ID, m_Cash_As_Payment, m_DateAcct, m_DocStatus, m_isSOTrx, m_needSave, m_onlyRule, m_PaymentRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterSave(boolean success) After save and transaction have been committed/rollbackgetBankAccountProcessor(String CCType, BigDecimal PayAmt) Get online payment processor configuration for tender type credit cardGet list of accepted credit card typesbooleanIs payment transaction have been approved by payment gatewaybooleanisBankAccountProcessorExist(String CCType, BigDecimal PayAmt) Is online payment processor have been configured for tender type credit cardvoidloadData()Load payment and related transaction records.booleanprocessOnline(String CCType, String CCNumber, String CCVV, String CCExp) Online payment processingbooleanprocessOnline(String CCType, String CCNumber, String CCVV, String CCExp, int C_PaymentProcessor_ID, String trxName) Online payment processingbooleanSave changesbooleanSave ChangesvalidateCreditCard(String CCType, String CCNumber, String CCVV, String CCExp, int C_BP_BankAccount_ID, String CustomerPaymentProfileID) Perform credit card validationMethods inherited from class org.compiere.grid.PaymentForm
dynInit, getBankAccountProcessor, getGridTab, getInvoiceID, getWindowNo, isBankAccountProcessorExist, isOnlyRule, needSave, processOnline, setBankAccountProcessor, setCustomizeValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.compiere.grid.IPaymentForm
checkMandatory, closeWindow, getWindow, saveChangesInTrx, showWindow
-
Field Details
-
m_C_Payment_ID
protected int m_C_Payment_IDStart Payment -
m_mPayment
-
m_mPaymentOriginal
-
m_mPaymentTransaction
-
m_CCType
Start CreditCard -
selectedCreditCard
-
processMsg
-
-
Constructor Details
-
PaymentFormCreditCard
- Parameters:
windowNo-mTab-
-
-
Method Details
-
loadData
public void loadData()Description copied from interface:IPaymentFormLoad payment and related transaction records. Usually call from dynInit() -
getCreditCardList
Get list of accepted credit card types- Returns:
- list of accepted credit card types
-
saveChanges
public boolean saveChanges()Description copied from interface:IPaymentFormSave Changes- Specified by:
saveChangesin interfaceIPaymentForm- Overrides:
saveChangesin classPaymentForm- Returns:
- true, if Window can exit
-
save
public boolean save(String CCType, String CCNumber, String CCExp, BigDecimal amount, String trxName) Save changes- Parameters:
CCType- credit card typeCCNumber- credit card numberCCExp- credit card expire dateamount- ignoretrxName-- Returns:
- true if save successfully
-
afterSave
protected void afterSave(boolean success) Description copied from class:PaymentFormAfter save and transaction have been committed/rollback- Specified by:
afterSavein classPaymentForm
-
processOnline
Online payment processing- Parameters:
CCType- credit card typeCCNumber- credit card numberCCVV- credit card ccvCCExp- 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) Online payment processing- Parameters:
CCType- credit card typeCCNumber- credit card numberCCVV- credit card ccvCCExp- credit card expire dateC_PaymentProcessor_ID- optional payment processor id. use the first configure if this is 0trxName- optional trx name- Returns:
- true if process successfully
-
isBankAccountProcessorExist
Is online payment processor have been configured for tender type credit card- Parameters:
CCType-PayAmt-- Returns:
- true if online payment processor have been configured for tender type credit card
-
getBankAccountProcessor
Get online payment processor configuration for tender type credit card- Parameters:
CCType-PayAmt-- Returns:
MBankAccountProcessor
-
isApproved
public boolean isApproved()Description copied from interface:IPaymentFormIs payment transaction have been approved by payment gateway- Specified by:
isApprovedin interfaceIPaymentForm- Overrides:
isApprovedin classPaymentForm- 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 Perform credit card validation- Parameters:
CCType- credit card typeCCNumber- credit card numberCCVV- credit card ccvCCExp- credit card expireC_BP_BankAccount_ID-CustomerPaymentProfileID-- Returns:
- error message if credit card doesn't pass validation
- Throws:
IllegalArgumentException
-