Package org.javlo.ecom
Class Basket
- java.lang.Object
-
- org.javlo.ecom.Basket
-
- All Implemented Interfaces:
Serializable
public class Basket extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Basket.PayementServiceBean
-
Field Summary
Fields Modifier and Type Field Description static int
ERROR_STEP
static int
FINAL_STEP
static String
GHOST_BASKET_KEY
static String
KEY
static int
ORDER_STEP
static int
PAY_STEP
static int
REGISTRATION_STEP
static int
START_STEP
static String
STATUS_MANUAL_PAYED
static String
STATUS_NEW
static String
STATUS_SENDED
static String
STATUS_TO_BE_VERIFIED
static String
STATUS_UNVALIDED
static String
STATUS_VALIDED
static String
STATUS_WAIT_PAY
-
Constructor Summary
Constructors Constructor Description Basket()
-
Method Summary
-
-
-
Field Detail
-
START_STEP
public static final int START_STEP
- See Also:
- Constant Field Values
-
REGISTRATION_STEP
public static final int REGISTRATION_STEP
- See Also:
- Constant Field Values
-
ORDER_STEP
public static final int ORDER_STEP
- See Also:
- Constant Field Values
-
PAY_STEP
public static final int PAY_STEP
- See Also:
- Constant Field Values
-
FINAL_STEP
public static final int FINAL_STEP
- See Also:
- Constant Field Values
-
ERROR_STEP
public static final int ERROR_STEP
- See Also:
- Constant Field Values
-
STATUS_UNVALIDED
public static final String STATUS_UNVALIDED
- See Also:
- Constant Field Values
-
STATUS_VALIDED
public static final String STATUS_VALIDED
- See Also:
- Constant Field Values
-
STATUS_TO_BE_VERIFIED
public static final String STATUS_TO_BE_VERIFIED
- See Also:
- Constant Field Values
-
STATUS_MANUAL_PAYED
public static final String STATUS_MANUAL_PAYED
- See Also:
- Constant Field Values
-
STATUS_NEW
public static final String STATUS_NEW
- See Also:
- Constant Field Values
-
STATUS_WAIT_PAY
public static final String STATUS_WAIT_PAY
- See Also:
- Constant Field Values
-
STATUS_SENDED
public static final String STATUS_SENDED
- See Also:
- Constant Field Values
-
KEY
public static final String KEY
- See Also:
- Constant Field Values
-
GHOST_BASKET_KEY
public static final String GHOST_BASKET_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
setInstance
public static void setInstance(ContentContext ctx, Basket basket)
-
renderPrice
public static String renderPrice(ContentContext ctx, double price, String currency)
-
getInstance
public static Basket getInstance(ContentContext ctx)
-
getStatus
public String getStatus()
-
setStatus
public void setStatus(String status)
-
reset
public void reset(ContentContext ctx)
-
isInstance
public static boolean isInstance(ContentContext ctx)
-
payAll
public EcomStatus payAll(ContentContext ctx)
-
reserve
public void reserve(ContentContext ctx)
-
cleanBasket
public void cleanBasket()
-
addProduct
public void addProduct(Product product)
-
removeProduct
public void removeProduct(String id)
-
getProductCount
public int getProductCount()
-
getTotal
public double getTotal(ContentContext ctx, boolean vat)
-
getTotalString
public String getTotalString(ContentContext ctx, boolean vat) throws Exception
- Throws:
Exception
-
getVAT
public String getVAT(ContentContext ctx) throws Exception
- Throws:
Exception
-
getDeliveryZone
public String getDeliveryZone()
-
getDelivery
public double getDelivery(ContentContext ctx, boolean vat)
-
getEcomService
protected EcomService getEcomService(ContentContext ctx)
-
getSize
public int getSize()
-
isValid
public boolean isValid()
-
setValid
public void setValid(boolean valid)
-
init
public void init(ContentContext ctx)
-
getId
public String getId()
-
getStructutedCommunication
public String getStructutedCommunication()
-
setId
public void setId(String id)
-
isConfirm
public boolean isConfirm()
-
setConfirm
public void setConfirm(boolean confirm)
-
getContactEmail
public String getContactEmail()
-
setContactEmail
public void setContactEmail(String contactEmail)
-
getContactPhone
public String getContactPhone()
-
setContactPhone
public void setContactPhone(String contactPhone)
-
getFirstName
public String getFirstName()
-
setFirstName
public void setFirstName(String firstName)
-
getLastName
public String getLastName()
-
setLastName
public void setLastName(String lastName)
-
getOrganization
public String getOrganization()
-
setOrganization
public void setOrganization(String organization)
-
getVATNumber
public String getVATNumber()
-
setVATNumber
public void setVATNumber(String vatNumber)
-
getAddress
public String getAddress()
-
getStreet
public String getStreet()
-
getNumber
public String getNumber()
-
setAddress
public void setAddress(String address)
-
getVatNumber
public String getVatNumber()
-
setVatNumber
public void setVatNumber(String vatNumber)
-
getCountry
public String getCountry()
-
setCountry
public void setCountry(String country)
-
getZip
public String getZip()
-
setZip
public void setZip(String zip)
-
getCity
public String getCity()
-
setCity
public void setCity(String city)
-
getInfo
public String getInfo()
-
setInfo
public void setInfo(String info)
-
getStep
public int getStep()
-
setStep
public void setStep(int step)
-
getServices
public List<Basket.PayementServiceBean> getServices()
-
getDate
public Date getDate()
-
getDateString
public String getDateString()
-
setDate
public void setDate(Date date)
-
main
public static void main(String[] args)
-
getProductsBean
public List<Product.ProductBean> getProductsBean(ContentContext ctx) throws Exception
- Throws:
Exception
-
getProductsBeanToString
public String getProductsBeanToString(ContentContext ctx) throws Exception
- Throws:
Exception
-
getToken
public String getToken()
-
setToken
public void setToken(String token)
-
getPayerID
public String getPayerID()
-
setPayerID
public void setPayerID(String payerID)
-
getValidationInfo
public String getValidationInfo()
-
setValidationInfo
public void setValidationInfo(String validationInfo)
-
getTransactionManager
public Object getTransactionManager()
reference to the ecom transaction manager (transiant)- Returns:
-
setTransactionManager
public void setTransactionManager(Object transactionManager)
-
isDeleted
public boolean isDeleted()
-
setDeleted
public void setDeleted(boolean deleted)
-
getAdministratorEmail
public String getAdministratorEmail(ContentContext ctx)
-
getTransfertAddressLogin
public String getTransfertAddressLogin()
-
setTransfertAddressLogin
public void setTransfertAddressLogin(String login)
set the username of user that we have transfert address info.- Parameters:
login
-
-
getUser
public String getUser()
-
setUser
public void setUser(String user)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
isDisplayInfo
public boolean isDisplayInfo()
-
isReadyToSend
public boolean isReadyToSend()
-
isPresumptiveFraud
public boolean isPresumptiveFraud()
-
setPresumptiveFraud
public void setPresumptiveFraud(boolean presumptiveFraud)
-
getUserReduction
public double getUserReduction()
-
setUserReduction
public void setUserReduction(double userReduction)
-
isNoShipping
public boolean isNoShipping()
-
setNoShipping
public void setNoShipping(boolean noShipping)
-
getDeliveryDate
public Date getDeliveryDate()
-
getDeliveryInputDate
public String getDeliveryInputDate() throws ParseException
- Throws:
ParseException
-
setDeliveryDate
public void setDeliveryDate(Date deliveryDate)
-
getSecurityKey
public String getSecurityKey()
-
getTransactionId
public String getTransactionId()
-
setTransactionId
public void setTransactionId(String transactionId)
-
getDeliveryInstructions
public String getDeliveryInstructions()
-
setDeliveryInstructions
public void setDeliveryInstructions(String deliveryInstructions)
-
getGiftMessage
public String getGiftMessage()
-
setGiftMessage
public void setGiftMessage(String giftMessage)
-
getBox
public String getBox()
-
setBox
public void setBox(String box)
-
getBillingName
public String getBillingName()
-
setBillingName
public void setBillingName(String billingName)
-
getBillingAddress
public String getBillingAddress()
-
setBillingAddress
public void setBillingAddress(String billingAdress)
-
getBillingPostcode
public String getBillingPostcode()
-
setBillingPostcode
public void setBillingPostcode(String billingPostcode)
-
getBillingCity
public String getBillingCity()
-
setBillingCity
public void setBillingCity(String billingCity)
-
getBillingCountry
public String getBillingCountry()
-
setBillingCountry
public void setBillingCountry(String billingCountry)
-
getBillingVat
public String getBillingVat()
-
setBillingVat
public void setBillingVat(String billingVat)
-
getPaymentType
public String getPaymentType()
-
setPaymentType
public void setPaymentType(String PaymentType)
-
getComponentId
public String getComponentId()
-
setComponentId
public void setComponentId(String componentId)
-
getPaymentIntentCreditCard
public String getPaymentIntentCreditCard()
-
setPaymentIntentCreditCard
public void setPaymentIntentCreditCard(String paymentIntentCreditCard)
-
getPaymentIntentBancontact
public String getPaymentIntentBancontact()
-
setPaymentIntentBancontact
public void setPaymentIntentBancontact(String paymentIntentBancontact)
-
getInvoiceHash
public String getInvoiceHash()
-
setInvoiceHash
public void setInvoiceHash(String invoiceHash)
-
isLock
public boolean isLock()
-
setLock
public void setLock(boolean lock)
-
getGiftSender
public String getGiftSender()
-
setGiftSender
public void setGiftSender(String giftSender)
-
getGiftReceiver
public String getGiftReceiver()
-
setGiftReceiver
public void setGiftReceiver(String giftReceiver)
-
getCustomerFirstName
public String getCustomerFirstName()
-
setCustomerFirstName
public void setCustomerFirstName(String customerFirstName)
-
getCustomerLastName
public String getCustomerLastName()
-
setCustomerLastName
public void setCustomerLastName(String customerLastName)
-
getCustomerEmail
public String getCustomerEmail()
-
setCustomerEmail
public void setCustomerEmail(String customerEmail)
-
getCustomerPhone
public String getCustomerPhone()
-
setCustomerPhone
public void setCustomerPhone(String customerPhone)
-
getRealFirstName
public String getRealFirstName()
-
getRealLastName
public String getRealLastName()
-
getRealEmail
public String getRealEmail()
-
getLanguage
public String getLanguage()
-
setLanguage
public void setLanguage(String language)
-
-