public class Payment extends AbstractIdentifiedHibernateObject<Payment> implements Cloneable
- added property cashregister
- cashregister is set to ActiveCash on creation
- amount will be rounded to two digits when set
- version for clone set to zero
id
Constructor and Description |
---|
Payment()
Contructor, always set current cashregister relationship
|
Modifier and Type | Method and Description |
---|---|
Payment |
clone() |
void |
delete()
This is a convenience method to wrap the operation in a transaction.
|
double |
getAmount() |
String |
getAuth_code()
This is the authentication code for credit card payments.
|
String |
getCard_number() |
CashRegister |
getCashregister() |
String |
getComment() |
Double |
getConversion_rate() |
String |
getCurrency_code() |
String |
getHolder_name() |
String |
getMethod() |
String |
getName()
The name of the payment method.
|
PaymentInfo |
getPaymentInfo() |
Integer |
getSerial()
A serial number can be used to identify payments created in the
Payments dialog.
|
Ticket |
getTicket() |
Payment |
getTipRecord() |
void |
revertGatewayPayment()
Revert a card related payment: The gateway transaction is reverted if possible.
|
void |
setActiveCash() |
void |
setAmount(Double amount) |
void |
setAuth_code(String auth_code)
See getAuth_code
|
void |
setCard_number(String card_number) |
void |
setCashregister(CashRegister cashregister) |
void |
setComment(String comment) |
void |
setConversion_rate(Double conversion_rate) |
void |
setCurrency_code(String currency_code) |
void |
setHolder_name(String holder_name) |
void |
setMethod(String method) |
void |
setName(String name)
The name of the payment method.
|
void |
setPaymentInfo(PaymentInfo paymentInfo) |
void |
setSerial(Integer serial)
The serial number should be set in a DB trigger rather then in POSper
to have flexibility for customized solutions.
|
void |
setTicket(Ticket ticket) |
String |
submitGatewayPayment()
WIP: Submit the payment to the appropriate gateway.
|
equals, getId, getVersion, hashCode, setId, setVersion
getGetters, getKeyValue, merge, refresh, save
public Payment()
public Ticket getTicket()
public void setCashregister(CashRegister cashregister)
public CashRegister getCashregister()
public String getComment()
public void setComment(String comment)
public void setTicket(Ticket ticket)
public double getAmount()
public void setAmount(Double amount)
amount
- how much this payment was forpublic String getMethod()
public void setMethod(String method)
public Double getConversion_rate()
public void setConversion_rate(Double conversion_rate)
public String getCurrency_code()
public void setCurrency_code(String currency_code)
public PaymentInfo getPaymentInfo()
public void setPaymentInfo(PaymentInfo paymentInfo)
paymentInfo
- the paymentInfo to setpublic Integer getSerial()
public void setSerial(Integer serial)
serial
- public String getName()
public void setName(String name)
name
- public void setActiveCash()
public String getAuth_code()
name
- public void setAuth_code(String auth_code)
auth_code
- public String getCard_number()
public void setCard_number(String card_number)
public String getHolder_name()
public void setHolder_name(String holder_name)
public String submitGatewayPayment()
public void revertGatewayPayment() throws PaymentGatewayException
PaymentGatewayException
public void delete() throws BasicException
AbstractHibernateObject
delete
in class AbstractHibernateObject<Payment>
BasicException
public Payment getTipRecord()
Copyright © 2021. All rights reserved.