Class WebPosTransaction
- java.lang.Object
-
- org.apache.ofbiz.webpos.transaction.WebPosTransaction
-
public class WebPosTransaction extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
EXTERNAL_PAYMENT
static int
INTERNAL_PAYMENT
static java.lang.String
module
static int
NO_PAYMENT
static java.lang.String
resource
-
Constructor Summary
Constructors Constructor Description WebPosTransaction(WebPosSession session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigDecimal
addPayment(java.lang.String id, java.math.BigDecimal amount)
java.math.BigDecimal
addPayment(java.lang.String id, java.math.BigDecimal amount, java.lang.String refNum, java.lang.String authCode)
java.lang.String
addProductPromoCode(java.lang.String code)
void
calcTax()
int
checkPaymentMethodType(java.lang.String paymentMethodTypeId)
void
clearPayment(int index)
void
clearPayment(java.lang.String id)
void
clearPayments()
void
closeTx()
ShoppingCart
getCart()
int
getDrawerNumber()
static int
getExternalPaymentCode()
java.lang.String
getFacilityId()
java.math.BigDecimal
getGrandTotal()
static int
getInternalPaymentCode()
static int
getNoPaymentCode()
int
getNumberOfPayments()
ShoppingCart.CartPaymentInfo
getPaymentInfo(int index)
java.lang.String
getPaymentMethodTypeId(int index)
java.math.BigDecimal
getPaymentTotal()
java.math.BigDecimal
getTaxTotal()
java.lang.String
getTerminalId()
java.lang.String
getTerminalLogId()
GenericValue
getTerminalState()
java.math.BigDecimal
getTotalDue()
java.math.BigDecimal
getTotalQuantity()
java.lang.String
getTransactionId()
java.lang.String
getUserLoginId()
boolean
isOpen()
java.lang.String
makeCreditCardVo(java.lang.String cardNumber, java.lang.String expDate, java.lang.String firstName, java.lang.String lastName)
void
modifyPrice(int cartLineIdx, java.math.BigDecimal price)
void
paidInOut(java.lang.String type)
java.math.BigDecimal
processAmount(java.math.BigDecimal amount)
void
processExternalPayment(java.lang.String paymentMethodTypeId, java.math.BigDecimal amount, java.lang.String refNum)
void
processNoPayment(java.lang.String paymentMethodTypeId)
java.math.BigDecimal
processSale()
void
setPaymentPostalCode(java.lang.String paymentId, java.lang.String refNum, java.lang.String postalCode)
void
setPaymentRefNum(int paymentIndex, java.lang.String refNum, java.lang.String authCode)
void
setPaymentSecurityCode(java.lang.String paymentId, java.lang.String refNum, java.lang.String securityCode)
void
setPaymentTrack2(java.lang.String paymentId, java.lang.String refNum, java.lang.String securityCode)
-
-
-
Field Detail
-
resource
public static final java.lang.String resource
- See Also:
- Constant Field Values
-
module
public static final java.lang.String module
-
NO_PAYMENT
public static final int NO_PAYMENT
- See Also:
- Constant Field Values
-
INTERNAL_PAYMENT
public static final int INTERNAL_PAYMENT
- See Also:
- Constant Field Values
-
EXTERNAL_PAYMENT
public static final int EXTERNAL_PAYMENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebPosTransaction
public WebPosTransaction(WebPosSession session)
-
-
Method Detail
-
getUserLoginId
public java.lang.String getUserLoginId()
-
getDrawerNumber
public int getDrawerNumber()
-
getTransactionId
public java.lang.String getTransactionId()
-
getTerminalId
public java.lang.String getTerminalId()
-
getFacilityId
public java.lang.String getFacilityId()
-
getTerminalLogId
public java.lang.String getTerminalLogId()
-
isOpen
public boolean isOpen()
-
getTerminalState
public GenericValue getTerminalState()
-
closeTx
public void closeTx()
-
paidInOut
public void paidInOut(java.lang.String type)
-
modifyPrice
public void modifyPrice(int cartLineIdx, java.math.BigDecimal price)
-
calcTax
public void calcTax()
-
processSale
public java.math.BigDecimal processSale() throws GeneralException
- Throws:
GeneralException
-
clearPayments
public void clearPayments()
-
clearPayment
public void clearPayment(int index)
-
clearPayment
public void clearPayment(java.lang.String id)
-
getPaymentInfo
public ShoppingCart.CartPaymentInfo getPaymentInfo(int index)
-
getPaymentMethodTypeId
public java.lang.String getPaymentMethodTypeId(int index)
-
checkPaymentMethodType
public int checkPaymentMethodType(java.lang.String paymentMethodTypeId)
-
getNoPaymentCode
public static int getNoPaymentCode()
-
getExternalPaymentCode
public static int getExternalPaymentCode()
-
getInternalPaymentCode
public static int getInternalPaymentCode()
-
addPayment
public java.math.BigDecimal addPayment(java.lang.String id, java.math.BigDecimal amount)
-
addPayment
public java.math.BigDecimal addPayment(java.lang.String id, java.math.BigDecimal amount, java.lang.String refNum, java.lang.String authCode)
-
processAmount
public java.math.BigDecimal processAmount(java.math.BigDecimal amount) throws GeneralException
- Throws:
GeneralException
-
processNoPayment
public void processNoPayment(java.lang.String paymentMethodTypeId)
-
processExternalPayment
public void processExternalPayment(java.lang.String paymentMethodTypeId, java.math.BigDecimal amount, java.lang.String refNum)
-
makeCreditCardVo
public java.lang.String makeCreditCardVo(java.lang.String cardNumber, java.lang.String expDate, java.lang.String firstName, java.lang.String lastName)
-
setPaymentRefNum
public void setPaymentRefNum(int paymentIndex, java.lang.String refNum, java.lang.String authCode)
-
setPaymentSecurityCode
public void setPaymentSecurityCode(java.lang.String paymentId, java.lang.String refNum, java.lang.String securityCode)
-
setPaymentTrack2
public void setPaymentTrack2(java.lang.String paymentId, java.lang.String refNum, java.lang.String securityCode)
-
setPaymentPostalCode
public void setPaymentPostalCode(java.lang.String paymentId, java.lang.String refNum, java.lang.String postalCode)
-
getTaxTotal
public java.math.BigDecimal getTaxTotal()
-
getGrandTotal
public java.math.BigDecimal getGrandTotal()
-
getNumberOfPayments
public int getNumberOfPayments()
-
getPaymentTotal
public java.math.BigDecimal getPaymentTotal()
-
getTotalQuantity
public java.math.BigDecimal getTotalQuantity()
-
getTotalDue
public java.math.BigDecimal getTotalDue()
-
addProductPromoCode
public java.lang.String addProductPromoCode(java.lang.String code)
-
getCart
public ShoppingCart getCart()
-
-