com.mypos.myposcheckout.ipc.request

 

Class Purchase

java.lang.Object com.mypos.myposcheckout.ipc.request.Request com.mypos.myposcheckout.ipc.request.Purchase


public class Purchase
extends Request
Process IPC method: IPCPurchase. This method initiates the beginning of the payment process for a customer. The customer is placed on a page that requests entering payment card details.

 

Field Summary

Fields inherited from class com.mypos.myposcheckout.ipc.request.Request

configoutputFormat

 

Constructor Summary

Constructors
Constructor and Description
Purchase(Config config) 

 

Method Summary

All MethodsInstance MethodsConcrete Methods
Modifier and Type Method and Description
java.math.BigDecimal getAmount() 
java.net.URL getCancelUrl() 
CardTokenRequest getCardTokenRequest() 
Cart getCart() 
Currency getCurrency() 
Customer getCustomer() 
java.lang.String getNote() 
java.net.URL getNotifyUrl() 
java.lang.String getOrderId() 
PaymentParametersRequired getParametersRequired() 
java.net.URL getSuccessUrl() 
boolean process()
Gather all request parameters needed to make an API call.
void setAmount(java.math.BigDecimal amount) 
void setCancelUrl(java.net.URL cancelUrl) 
void setCardTokenRequest(CardTokenRequest cardTokenRequest) 
void setCart(Cart cart) 
void setCurrency(Currency currency) 
void setCustomer(Customer customer) 
void setNote(java.lang.String note) 
void setNotifyUrl(java.net.URL notifyUrl) 
void setOrderId(java.lang.String orderId) 
void setParametersRequired(PaymentParametersRequired parametersRequired) 
void setSuccessUrl(java.net.URL successUrl) 
boolean validate()
Checks if the class members are valid API request parameter values.

 

Methods inherited from class com.mypos.myposcheckout.ipc.request.Request

addRequestParamaddRequestParamaddRequestParamaddRequestParamaddRequestParamaddStandardParamsclearRequestParamscreateApiCallFormHtmlcreateApiCallFormHtml,createApiCallFormHtmlcreateSignaturegetConfiggetOutputFormatgetSignedRequestParamsprocessApiCallremoveRequestParamsetConfigsetOutputFormat

 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Purchase

public Purchase(Config config)

 

Method Detail

getAmount

public java.math.BigDecimal getAmount()

setAmount

public void setAmount(java.math.BigDecimal amount)

getCurrency

public Currency getCurrency()

setCurrency

public void setCurrency(Currency currency)

getCart

public Cart getCart()

setCart

public void setCart(Cart cart)

getCustomer

public Customer getCustomer()

setCustomer

public void setCustomer(Customer customer)

getSuccessUrl

public java.net.URL getSuccessUrl()

setSuccessUrl

public void setSuccessUrl(java.net.URL successUrl)

getCancelUrl

public java.net.URL getCancelUrl()

setCancelUrl

public void setCancelUrl(java.net.URL cancelUrl)

getNotifyUrl

public java.net.URL getNotifyUrl()

setNotifyUrl

public void setNotifyUrl(java.net.URL notifyUrl)

getCardTokenRequest

public CardTokenRequest getCardTokenRequest()

setCardTokenRequest

public void setCardTokenRequest(CardTokenRequest cardTokenRequest)

getParametersRequired

public PaymentParametersRequired getParametersRequired()

setParametersRequired

public void setParametersRequired(PaymentParametersRequired parametersRequired)

getOrderId

public java.lang.String getOrderId()

setOrderId

public void setOrderId(java.lang.String orderId)

getNote

public java.lang.String getNote()

setNote

public void setNote(java.lang.String note)

validate

public boolean validate()
                 throws IPCException
Checks if the class members are valid API request parameter values.
Returns:
true if all members can be used as valid API request parameters
Throws:
IPCException - If there are values which are missing, or invalid API request parameters.

process

public boolean process()
                throws IPCException
Gather all request parameters needed to make an API call.
Returns:
true if all parameters and configurations are valid, throws otherwise
Throws:
IPCException - If there are invalid or missing parameters, or configuration values.