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
- 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 trx committed/rollbackgetBankAccountProcessor
(String CCType, BigDecimal PayAmt) Get online payment processor configuration for tender type credit cardboolean
boolean
isBankAccountProcessorExist
(String CCType, BigDecimal PayAmt) void
loadData()
Load payment and related transaction records.boolean
processOnline
(String CCType, String CCNumber, String CCVV, String CCExp) boolean
processOnline
(String CCType, String CCNumber, String CCVV, String CCExp, int C_PaymentProcessor_ID, String trxName) boolean
boolean
Save ChangesvalidateCreditCard
(String CCType, String CCNumber, String CCVV, String CCExp, int C_BP_BankAccount_ID, String CustomerPaymentProfileID) Methods 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
- 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) - 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 trx committed/rollback- Specified by:
afterSave
in classPaymentForm
-
processOnline
- 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) - 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
- 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()- 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 - 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
-