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
Modifier and TypeFieldDescriptionprotected int
Start Paymentprotected String
Start CreditCardprotected MPayment
protected MPayment
protected MPaymentTransaction
protected String
protected ValueNamePair
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterSave
(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 typesboolean
Is payment transaction have been approved by payment gatewayboolean
isBankAccountProcessorExist
(String CCType, BigDecimal PayAmt) Is online payment processor have been configured for tender type credit cardvoid
loadData()
Load payment and related transaction records.boolean
processOnline
(String CCType, String CCNumber, String CCVV, String CCExp) Online payment processingboolean
processOnline
(String CCType, String CCNumber, String CCVV, String CCExp, int C_PaymentProcessor_ID, String trxName) Online payment processingboolean
Save changesboolean
Save 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, setCustomizeValues
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:IPaymentForm
Load 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:IPaymentForm
Save Changes- Specified by:
saveChanges
in interfaceIPaymentForm
- Overrides:
saveChanges
in 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:PaymentForm
After save and transaction have been committed/rollback- Specified by:
afterSave
in 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:IPaymentForm
Is payment transaction have been approved by payment gateway- Specified by:
isApproved
in interfaceIPaymentForm
- Overrides:
isApproved
in 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
-