public class BlockChypClient extends Object
Modifier and Type | Field and Description |
---|---|
static long |
MS_PER_HOUR |
static String |
OFFLINE_CACHE |
static String |
OFFLINE_FIXED_KEY |
Constructor and Description |
---|
BlockChypClient()
Default constructor.
|
BlockChypClient(APICredentials defaultCredentials)
Provided as a convenience to support constructor based dependency injection.
|
BlockChypClient(String gatewayHost)
Provided as a convenience to support constructor based dependency injection.
|
BlockChypClient(String gatewayHost,
APICredentials defaultCredentials)
Provided as a convenience to support constructor based dependency injection.
|
BlockChypClient(String gatewayHost,
String testGatewayHost,
APICredentials defaultCredentials)
Provided as a convenience to support constructor based dependency injection.
|
BlockChypClient(String dashboardHost,
String gatewayHost,
String testGatewayHost,
APICredentials defaultCredentials)
Provided as a convenience to support constructor based dependency injection.
|
Modifier and Type | Method and Description |
---|---|
Acknowledgement |
activateTerminal(TerminalActivationRequest request)
Activates a terminal.
|
MerchantProfileResponse |
addTestMerchant(AddTestMerchantRequest request)
Adds a test merchant account.
|
BalanceResponse |
balance(BalanceRequest request)
Checks the remaining balance on a payment method.
|
BatchDetailsResponse |
batchDetails(BatchDetailsRequest request)
Returns the batch details for a single batch.
|
BatchHistoryResponse |
batchHistory(BatchHistoryRequest request)
Returns the batch history for a merchant.
|
BooleanPromptResponse |
booleanPrompt(BooleanPromptRequest request)
Asks the consumer a yes/no question.
|
CancelPaymentLinkResponse |
cancelPaymentLink(CancelPaymentLinkRequest request)
Cancels a payment link.
|
CaptureResponse |
capture(CaptureRequest request)
Captures a preauthorization.
|
CaptureSignatureResponse |
captureSignature(CaptureSignatureRequest request)
Captures and returns a signature.
|
CashDiscountResponse |
cashDiscount(CashDiscountRequest request)
Calculates the discount for actual cash transactions.
|
AuthorizationResponse |
charge(AuthorizationRequest request)
Executes a standard direct preauth and capture.
|
Acknowledgement |
clear(ClearTerminalRequest request)
Clears the line item display and any in progress transaction.
|
CloseBatchResponse |
closeBatch(CloseBatchRequest request)
Closes the current credit card batch.
|
CustomerResponse |
customer(CustomerRequest request)
Retrieves a customer by id.
|
CustomerSearchResponse |
customerSearch(CustomerSearchRequest request)
Searches the customer database.
|
Acknowledgement |
deactivateTerminal(TerminalDeactivationRequest request)
Deactivates a terminal.
|
protected APICredentials |
decrypt(APICredentials creds)
Decrypts API credentials using the offline cache key.
|
Acknowledgement |
deleteBrandingAsset(BrandingAssetRequest request)
Deletes a branding asset.
|
DeleteCustomerResponse |
deleteCustomer(DeleteCustomerRequest request)
Deletes a customer record.
|
protected Object |
deleteDashboard(String path,
ITimeoutRequest request,
Class responseClass)
Executes a delete HTTP request against the gateway.
|
protected Object |
deleteGateway(String path,
ITimeoutRequest request,
Class responseClass)
Executes a delete HTTP request against the gateway.
|
Acknowledgement |
deleteMediaAsset(MediaRequest request)
Deletes a media asset.
|
Acknowledgement |
deleteMerchantPlatforms(MerchantPlatformRequest request)
Deletes a boarding platform configuration.
|
DeleteQueuedTransactionResponse |
deleteQueuedTransaction(DeleteQueuedTransactionRequest request)
Deletes a queued transaction from the terminal.
|
Acknowledgement |
deleteSlideShow(SlideShowRequest request)
Deletes a single slide show.
|
Acknowledgement |
deleteSurveyQuestion(SurveyQuestionRequest request)
Deletes a survey question.
|
Acknowledgement |
deleteTestMerchant(MerchantProfileRequest request)
Deletes a test merchant account.
|
DeleteTokenResponse |
deleteToken(DeleteTokenRequest request)
Deletes a payment token.
|
protected byte[] |
deriveOfflineKey()
Generates the encryption key used for offline cache records.
|
protected void |
dumpSignatureFile(Object request,
Object response)
Writes the signature to a file if a signature is present and the caller has
requested it.
|
protected APICredentials |
encrypt(APICredentials creds)
Encrypts API credentials using the offline cache key.
|
EnrollResponse |
enroll(EnrollRequest request)
Adds a new payment method to the token vault.
|
protected Object |
finishGatewayRequest(org.apache.commons.httpclient.HttpMethod method,
Class responseType)
Executes a previously assembled HttpMethod against the gateway.
|
protected Object |
finishTerminalRequest(TerminalRouteResponse route,
Object request,
org.apache.commons.httpclient.HttpMethod method,
Class responseType)
This handles all the common logic associated with processing terminal http requests.
|
protected Object |
getDashboard(String path,
ITimeoutRequest request,
Class responseType)
Executes an http get request against the gateway with a timeout override.
|
protected Object |
getGateway(String path,
boolean test,
Class responseType)
Executes an http get request against the gateway with a timeout override.
|
protected Object |
getGateway(String path,
boolean test,
Class responseType,
int requestTimeout)
Executes an http get request against the gateway with a timeout override.
|
protected org.apache.commons.httpclient.HttpClient |
getGatewayClient()
Returns the gateway client singleton.
|
GetMerchantsResponse |
getMerchants(GetMerchantsRequest request)
Adds a test merchant account.
|
TerminalRouteResponse |
getOfflineCache(String terminalName)
Returns the route stored in the offline cache for the given terminal.
|
String |
getOfflineRouteCacheLocation()
Returns the offline route cache location.
|
protected org.apache.commons.httpclient.HttpClient |
getTerminalClient()
Returns the terminal client singleton.
|
GiftActivateResponse |
giftActivate(GiftActivateRequest request)
Activates or recharges a gift card.
|
HeartbeatResponse |
heartbeat(boolean test)
Tests communication with the Gateway.
|
protected void |
initObjectMapper()
Initializes the JSON encoder and parser.
|
Acknowledgement |
inviteMerchantUser(InviteMerchantUserRequest request)
Invites a user to join a merchant account.
|
boolean |
isTerminalHttps()
Gets the terminal https flag.
|
protected boolean |
isTerminalRouted(ITerminalReference terminalName)
Returns true if transaction for the given terminal reference should be routed over the local subnet.
|
Acknowledgement |
linkToken(LinkTokenRequest request)
Links a token to a customer record.
|
ListQueuedTransactionsResponse |
listQueuedTransactions(ListQueuedTransactionsRequest request)
Returns a list of queued transactions on a terminal.
|
LocateResponse |
locate(LocateRequest request)
Returns routing and location data for a payment terminal.
|
MediaLibraryResponse |
media(MediaRequest request)
Returns the media library for a given partner, merchant, or organization.
|
MediaMetadata |
mediaAsset(MediaRequest request)
Returns the media details for a single media asset.
|
MerchantPlatformsResponse |
merchantPlatforms(MerchantProfileRequest request)
List all merchant platforms configured for a gateway merchant.
|
MerchantProfileResponse |
merchantProfile(MerchantProfileRequest request)
Returns profile information for a merchant.
|
MerchantUsersResponse |
merchantUsers(MerchantProfileRequest request)
List all active users and pending invites for a merchant account.
|
Acknowledgement |
message(MessageRequest request)
Displays a short message on the terminal.
|
protected TerminalRequest |
newTerminalRequestForRoute(TerminalRouteResponse route)
Assembles a new terminal request and populates the credentials, using transient
credentials if available.
|
Acknowledgement |
newTransactionDisplay(TransactionDisplayRequest request)
Displays a new transaction on the terminal.
|
PingResponse |
ping(PingRequest request)
Tests connectivity with a payment terminal.
|
protected Object |
postDashboard(String path,
ITimeoutRequest request,
Class responseClass)
Executes a post HTTP request against the dashboard.
|
protected Object |
postGateway(String path,
ITimeoutRequest request,
Class responseClass)
Executes a post HTTP request against the gateway.
|
protected Object |
postTerminal(String path,
Object request,
Class responseType)
Posts an http request to the terminal API.
|
protected Object |
postUpload(String path,
UploadMetadata request,
InputStream inStream,
Class responseClass)
Executes a post HTTP request against the dashboard.
|
AuthorizationResponse |
preauth(AuthorizationRequest request)
Executes a preauthorization intended to be captured later.
|
protected Object |
putGateway(String path,
ITimeoutRequest request,
Class responseClass)
Executes a put HTTP request against the gateway.
|
protected Object |
putTerminal(String path,
Object request,
Class responseType)
Executes a put http request against the terminal API.
|
Acknowledgement |
reboot(PingRequest request)
Reboot a payment terminal.
|
AuthorizationResponse |
refund(RefundRequest request)
Executes a refund.
|
protected String |
resolveOfflineRouteCacheLocation(String terminalName)
Returns the offline cache location.
|
protected String |
resolveTerminalHost(TerminalRouteResponse route)
Assembles the scheme, ip address, and port number bits of a terminal URL.
|
protected TerminalRouteResponse |
resolveTerminalRoute(String terminalName)
Finds the terminal route record for the given terminal name.
|
AuthorizationResponse |
reverse(AuthorizationRequest request)
Executes a manual time out reversal.
|
protected TerminalRouteResponse |
routeCacheGet(String terminalName)
Looks up a terminal route from the cache.
|
protected void |
routeCachePut(TerminalRouteResponse route)
Puts a terminal route in the cache (both caches).
|
PaymentLinkResponse |
sendPaymentLink(PaymentLinkRequest request)
Creates and send a payment link to a customer.
|
void |
setDashboardHost(String dashboardHost)
Used to override the dashboard host.
|
void |
setDefaultCredentials(APICredentials defaultCredentials)
Sets the default root API credentials for the client.
|
void |
setGatewayHost(String gatewayHost)
Used to override the live gateway host.
|
void |
setOfflineRouteCacheEnabled(boolean offlineRouteCacheEnabled)
Enables or disables offline terminal route caching.
|
void |
setOfflineRouteCacheLocation(String offlineRouteCacheLocation)
Sets the offline route cache location if you want to override the default.
|
void |
setPaymentLogger(PaymentLogger paymentLogger)
Sets the payment logger.
|
void |
setTerminalHttps(boolean terminalHttps)
Sets the terminal https flag.
|
void |
setTestGatewayHost(String testGatewayHost)
Used to override the test gateway host.
|
SlideShow |
slideShow(SlideShowRequest request)
Returns a single slide show with slides.
|
SlideShowResponse |
slideShows(SlideShowRequest request)
Returns a collection of slide shows.
|
SurveyQuestion |
surveyQuestion(SurveyQuestionRequest request)
Returns a single survey question with response data.
|
SurveyQuestionResponse |
surveyQuestions(SurveyQuestionRequest request)
Returns all survey questions for a given merchant.
|
SurveyQuestion |
surveyResults(SurveyResultsRequest request)
Returns results for a single survey question.
|
Acknowledgement |
tcDeleteTemplate(TermsAndConditionsTemplateRequest request)
Deletes a single terms and conditions template.
|
TermsAndConditionsLogEntry |
tcEntry(TermsAndConditionsLogRequest request)
Returns a single detailed Terms and Conditions entry.
|
TermsAndConditionsLogResponse |
tcLog(TermsAndConditionsLogRequest request)
Returns up to 250 entries from the Terms and Conditions log.
|
TermsAndConditionsTemplate |
tcTemplate(TermsAndConditionsTemplateRequest request)
Returns a single terms and conditions template.
|
TermsAndConditionsTemplateResponse |
tcTemplates(TermsAndConditionsTemplateRequest request)
Returns a list of terms and conditions templates associated with a merchant
account.
|
TermsAndConditionsTemplate |
tcUpdateTemplate(TermsAndConditionsTemplate request)
Updates or creates a terms and conditions template.
|
BrandingAssetResponse |
terminalBranding(BrandingAssetRequest request)
Returns the terminal branding stack for a given set of API credentials.
|
TerminalProfileResponse |
terminals(TerminalProfileRequest request)
Returns all terminals associated with the merchant account.
|
TerminalStatusResponse |
terminalStatus(TerminalStatusRequest request)
Returns the current status of a terminal.
|
TermsAndConditionsResponse |
termsAndConditions(TermsAndConditionsRequest request)
Prompts the user to accept terms and conditions.
|
TextPromptResponse |
textPrompt(TextPromptRequest request)
Asks the consumer a text based question.
|
protected String |
toFullyQualifiedDashboardPath(String path)
Converts path to the fully qualified URL for a dashboard API call.
|
protected String |
toFullyQualifiedGatewayPath(String path,
boolean test)
Converts path to the fully qualified URL for a gateway API call.
|
protected String |
toFullyQualifiedTerminalPath(TerminalRouteResponse route,
String path)
Assembles a full path to the terminal for an API call.
|
TokenMetadataResponse |
tokenMetadata(TokenMetadataRequest request)
Retrieves payment token metadata.
|
protected String |
toTerminalRouteKey(String terminalName)
Creates a cache key for terminal routes.
|
TransactionHistoryResponse |
transactionHistory(TransactionHistoryRequest request)
Returns the transaction history for a merchant.
|
AuthorizationResponse |
transactionStatus(TransactionStatusRequest request)
Retrieves the current status of a transaction.
|
Acknowledgement |
unlinkToken(UnlinkTokenRequest request)
Removes a link between a customer and a token.
|
BrandingAsset |
updateBrandingAsset(BrandingAsset request)
Updates a branding asset.
|
CustomerResponse |
updateCustomer(UpdateCustomerRequest request)
Updates or creates a customer record.
|
MerchantProfileResponse |
updateMerchant(MerchantProfile request)
Adds or updates a merchant account.
|
Acknowledgement |
updateMerchantPlatforms(MerchantPlatform request)
List all merchant platforms configured for a gateway merchant.
|
SlideShow |
updateSlideShow(SlideShow request)
Updates or creates a slide show.
|
SurveyQuestion |
updateSurveyQuestion(SurveyQuestion request)
Updates or creates a survey question.
|
Acknowledgement |
updateTransactionDisplay(TransactionDisplayRequest request)
Appends items to an existing transaction display.
|
MediaMetadata |
uploadMedia(UploadMetadata request,
InputStream inStream)
Uploads a media asset to the media library.
|
UploadStatus |
uploadStatus(UploadStatusRequest request)
Retrieves the current status of a file upload.
|
VoidResponse |
voidTx(VoidRequest request)
Discards a previous transaction.
|
public static final String OFFLINE_CACHE
public static final String OFFLINE_FIXED_KEY
public static final long MS_PER_HOUR
public BlockChypClient()
public BlockChypClient(String gatewayHost)
gatewayHost
- alternate gateway endpoint.public BlockChypClient(APICredentials defaultCredentials)
defaultCredentials
- APICredentials
public BlockChypClient(String gatewayHost, APICredentials defaultCredentials)
gatewayHost
- alternate gateway endpoint.defaultCredentials
- APICredentials
public BlockChypClient(String gatewayHost, String testGatewayHost, APICredentials defaultCredentials)
gatewayHost
- alternate gateway endpoint.testGatewayHost
- alternate gateway endpoint.defaultCredentials
- APICredentials
public BlockChypClient(String dashboardHost, String gatewayHost, String testGatewayHost, APICredentials defaultCredentials)
dashboardHost
- alternate dashboard endpoint.gatewayHost
- alternate gateway endpoint.testGatewayHost
- alternate gateway endpoint.defaultCredentials
- APICredentials
public void setGatewayHost(String gatewayHost)
gatewayHost
- alternate gateway endpoint.public void setDashboardHost(String dashboardHost)
dashboardHost
- alternate dashboard endpoint.public void setTestGatewayHost(String testGatewayHost)
testGatewayHost
- alternate gateway endpoint.public void setDefaultCredentials(APICredentials defaultCredentials)
defaultCredentials
- APICredentials
public void setOfflineRouteCacheEnabled(boolean offlineRouteCacheEnabled)
offlineRouteCacheEnabled
- true if offline route caching is enabled.public void setPaymentLogger(PaymentLogger paymentLogger)
paymentLogger
- an implementation of PaymentLogger
protected void initObjectMapper()
public HeartbeatResponse heartbeat(boolean test) throws Exception
test
- whether or not to route the the transaction to the test gateway.Acknowledgement
Exception
- exception if any errors occurred processing the request.public LocateResponse locate(LocateRequest request) throws Exception
request
- the request parameters.LocateResponse
Exception
- exception if any errors occurred processing the request.public CaptureResponse capture(CaptureRequest request) throws Exception
request
- the request parameters.CaptureResponse
Exception
- exception if any errors occurred processing the request.public VoidResponse voidTx(VoidRequest request) throws Exception
request
- the request parameters.VoidResponse
Exception
- exception if any errors occurred processing the request.public AuthorizationResponse reverse(AuthorizationRequest request) throws Exception
request
- the request parameters.AuthorizationResponse
Exception
- exception if any errors occurred processing the request.public CloseBatchResponse closeBatch(CloseBatchRequest request) throws Exception
request
- the request parameters.CloseBatchResponse
Exception
- exception if any errors occurred processing the request.public PaymentLinkResponse sendPaymentLink(PaymentLinkRequest request) throws Exception
request
- the request parameters.PaymentLinkResponse
Exception
- exception if any errors occurred processing the request.public CancelPaymentLinkResponse cancelPaymentLink(CancelPaymentLinkRequest request) throws Exception
request
- the request parameters.CancelPaymentLinkResponse
Exception
- exception if any errors occurred processing the request.public AuthorizationResponse transactionStatus(TransactionStatusRequest request) throws Exception
request
- the request parameters.AuthorizationResponse
Exception
- exception if any errors occurred processing the request.public CustomerResponse updateCustomer(UpdateCustomerRequest request) throws Exception
request
- the request parameters.CustomerResponse
Exception
- exception if any errors occurred processing the request.public CustomerResponse customer(CustomerRequest request) throws Exception
request
- the request parameters.CustomerResponse
Exception
- exception if any errors occurred processing the request.public CustomerSearchResponse customerSearch(CustomerSearchRequest request) throws Exception
request
- the request parameters.CustomerSearchResponse
Exception
- exception if any errors occurred processing the request.public CashDiscountResponse cashDiscount(CashDiscountRequest request) throws Exception
request
- the request parameters.CashDiscountResponse
Exception
- exception if any errors occurred processing the request.public BatchHistoryResponse batchHistory(BatchHistoryRequest request) throws Exception
request
- the request parameters.BatchHistoryResponse
Exception
- exception if any errors occurred processing the request.public BatchDetailsResponse batchDetails(BatchDetailsRequest request) throws Exception
request
- the request parameters.BatchDetailsResponse
Exception
- exception if any errors occurred processing the request.public TransactionHistoryResponse transactionHistory(TransactionHistoryRequest request) throws Exception
request
- the request parameters.TransactionHistoryResponse
Exception
- exception if any errors occurred processing the request.public MerchantProfileResponse merchantProfile(MerchantProfileRequest request) throws Exception
request
- the request parameters.MerchantProfileResponse
Exception
- exception if any errors occurred processing the request.public DeleteCustomerResponse deleteCustomer(DeleteCustomerRequest request) throws Exception
request
- the request parameters.DeleteCustomerResponse
Exception
- exception if any errors occurred processing the request.public TokenMetadataResponse tokenMetadata(TokenMetadataRequest request) throws Exception
request
- the request parameters.TokenMetadataResponse
Exception
- exception if any errors occurred processing the request.public Acknowledgement linkToken(LinkTokenRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public Acknowledgement unlinkToken(UnlinkTokenRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public DeleteTokenResponse deleteToken(DeleteTokenRequest request) throws Exception
request
- the request parameters.DeleteTokenResponse
Exception
- exception if any errors occurred processing the request.public GetMerchantsResponse getMerchants(GetMerchantsRequest request) throws Exception
request
- the request parameters.GetMerchantsResponse
Exception
- exception if any errors occurred processing the request.public MerchantProfileResponse updateMerchant(MerchantProfile request) throws Exception
request
- the request parameters.MerchantProfileResponse
Exception
- exception if any errors occurred processing the request.public MerchantUsersResponse merchantUsers(MerchantProfileRequest request) throws Exception
request
- the request parameters.MerchantUsersResponse
Exception
- exception if any errors occurred processing the request.public Acknowledgement inviteMerchantUser(InviteMerchantUserRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public MerchantProfileResponse addTestMerchant(AddTestMerchantRequest request) throws Exception
request
- the request parameters.MerchantProfileResponse
Exception
- exception if any errors occurred processing the request.public Acknowledgement deleteTestMerchant(MerchantProfileRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public MerchantPlatformsResponse merchantPlatforms(MerchantProfileRequest request) throws Exception
request
- the request parameters.MerchantPlatformsResponse
Exception
- exception if any errors occurred processing the request.public Acknowledgement updateMerchantPlatforms(MerchantPlatform request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public Acknowledgement deleteMerchantPlatforms(MerchantPlatformRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public TerminalProfileResponse terminals(TerminalProfileRequest request) throws Exception
request
- the request parameters.TerminalProfileResponse
Exception
- exception if any errors occurred processing the request.public Acknowledgement deactivateTerminal(TerminalDeactivationRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public Acknowledgement activateTerminal(TerminalActivationRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public TermsAndConditionsTemplateResponse tcTemplates(TermsAndConditionsTemplateRequest request) throws Exception
request
- the request parameters.TermsAndConditionsTemplateResponse
Exception
- exception if any errors occurred processing the request.public TermsAndConditionsTemplate tcTemplate(TermsAndConditionsTemplateRequest request) throws Exception
request
- the request parameters.TermsAndConditionsTemplate
Exception
- exception if any errors occurred processing the request.public TermsAndConditionsTemplate tcUpdateTemplate(TermsAndConditionsTemplate request) throws Exception
request
- the request parameters.TermsAndConditionsTemplate
Exception
- exception if any errors occurred processing the request.public Acknowledgement tcDeleteTemplate(TermsAndConditionsTemplateRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public TermsAndConditionsLogResponse tcLog(TermsAndConditionsLogRequest request) throws Exception
request
- the request parameters.TermsAndConditionsLogResponse
Exception
- exception if any errors occurred processing the request.public TermsAndConditionsLogEntry tcEntry(TermsAndConditionsLogRequest request) throws Exception
request
- the request parameters.TermsAndConditionsLogEntry
Exception
- exception if any errors occurred processing the request.public SurveyQuestionResponse surveyQuestions(SurveyQuestionRequest request) throws Exception
request
- the request parameters.SurveyQuestionResponse
Exception
- exception if any errors occurred processing the request.public SurveyQuestion surveyQuestion(SurveyQuestionRequest request) throws Exception
request
- the request parameters.SurveyQuestion
Exception
- exception if any errors occurred processing the request.public SurveyQuestion updateSurveyQuestion(SurveyQuestion request) throws Exception
request
- the request parameters.SurveyQuestion
Exception
- exception if any errors occurred processing the request.public Acknowledgement deleteSurveyQuestion(SurveyQuestionRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public SurveyQuestion surveyResults(SurveyResultsRequest request) throws Exception
request
- the request parameters.SurveyQuestion
Exception
- exception if any errors occurred processing the request.public MediaLibraryResponse media(MediaRequest request) throws Exception
request
- the request parameters.MediaLibraryResponse
Exception
- exception if any errors occurred processing the request.public MediaMetadata uploadMedia(UploadMetadata request, InputStream inStream) throws Exception
request
- the request parameters.MediaMetadata
Exception
- exception if any errors occurred processing the request.public UploadStatus uploadStatus(UploadStatusRequest request) throws Exception
request
- the request parameters.UploadStatus
Exception
- exception if any errors occurred processing the request.public MediaMetadata mediaAsset(MediaRequest request) throws Exception
request
- the request parameters.MediaMetadata
Exception
- exception if any errors occurred processing the request.public Acknowledgement deleteMediaAsset(MediaRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public SlideShowResponse slideShows(SlideShowRequest request) throws Exception
request
- the request parameters.SlideShowResponse
Exception
- exception if any errors occurred processing the request.public SlideShow slideShow(SlideShowRequest request) throws Exception
public SlideShow updateSlideShow(SlideShow request) throws Exception
public Acknowledgement deleteSlideShow(SlideShowRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public BrandingAssetResponse terminalBranding(BrandingAssetRequest request) throws Exception
request
- the request parameters.BrandingAssetResponse
Exception
- exception if any errors occurred processing the request.public BrandingAsset updateBrandingAsset(BrandingAsset request) throws Exception
request
- the request parameters.BrandingAsset
Exception
- exception if any errors occurred processing the request.public Acknowledgement deleteBrandingAsset(BrandingAssetRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public PingResponse ping(PingRequest request) throws Exception
request
- the request parameters.PingResponse
Exception
- exception if any errors occurred processing the request.public AuthorizationResponse charge(AuthorizationRequest request) throws Exception
request
- the request parameters.AuthorizationResponse
Exception
- exception if any errors occurred processing the request.public AuthorizationResponse preauth(AuthorizationRequest request) throws Exception
request
- the request parameters.AuthorizationResponse
Exception
- exception if any errors occurred processing the request.public AuthorizationResponse refund(RefundRequest request) throws Exception
request
- the request parameters.AuthorizationResponse
Exception
- exception if any errors occurred processing the request.public EnrollResponse enroll(EnrollRequest request) throws Exception
request
- the request parameters.EnrollResponse
Exception
- exception if any errors occurred processing the request.public GiftActivateResponse giftActivate(GiftActivateRequest request) throws Exception
request
- the request parameters.GiftActivateResponse
Exception
- exception if any errors occurred processing the request.public BalanceResponse balance(BalanceRequest request) throws Exception
request
- the request parameters.BalanceResponse
Exception
- exception if any errors occurred processing the request.public Acknowledgement clear(ClearTerminalRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public TerminalStatusResponse terminalStatus(TerminalStatusRequest request) throws Exception
request
- the request parameters.TerminalStatusResponse
Exception
- exception if any errors occurred processing the request.public TermsAndConditionsResponse termsAndConditions(TermsAndConditionsRequest request) throws Exception
request
- the request parameters.TermsAndConditionsResponse
Exception
- exception if any errors occurred processing the request.public CaptureSignatureResponse captureSignature(CaptureSignatureRequest request) throws Exception
request
- the request parameters.CaptureSignatureResponse
Exception
- exception if any errors occurred processing the request.public Acknowledgement newTransactionDisplay(TransactionDisplayRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public Acknowledgement updateTransactionDisplay(TransactionDisplayRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public Acknowledgement message(MessageRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.public BooleanPromptResponse booleanPrompt(BooleanPromptRequest request) throws Exception
request
- the request parameters.BooleanPromptResponse
Exception
- exception if any errors occurred processing the request.public TextPromptResponse textPrompt(TextPromptRequest request) throws Exception
request
- the request parameters.TextPromptResponse
Exception
- exception if any errors occurred processing the request.public ListQueuedTransactionsResponse listQueuedTransactions(ListQueuedTransactionsRequest request) throws Exception
request
- the request parameters.ListQueuedTransactionsResponse
Exception
- exception if any errors occurred processing the request.public DeleteQueuedTransactionResponse deleteQueuedTransaction(DeleteQueuedTransactionRequest request) throws Exception
request
- the request parameters.DeleteQueuedTransactionResponse
Exception
- exception if any errors occurred processing the request.public Acknowledgement reboot(PingRequest request) throws Exception
request
- the request parameters.Acknowledgement
Exception
- exception if any errors occurred processing the request.protected APICredentials decrypt(APICredentials creds)
creds
- blockchyp API credentials.protected APICredentials encrypt(APICredentials creds)
creds
- blockchyp API credentials.protected byte[] deriveOfflineKey()
protected TerminalRouteResponse routeCacheGet(String terminalName)
terminalName
- terminal name assigned at activation.protected void routeCachePut(TerminalRouteResponse route)
route
- the terminal route record.protected String toTerminalRouteKey(String terminalName)
terminalName
- terminal name.protected void dumpSignatureFile(Object request, Object response)
request
- ISignatureRequest
response
- ISignatureResponse
protected TerminalRouteResponse resolveTerminalRoute(String terminalName)
terminalName
- name of the terminal assigned at activation.protected org.apache.commons.httpclient.HttpClient getGatewayClient()
protected org.apache.commons.httpclient.HttpClient getTerminalClient()
protected String resolveTerminalHost(TerminalRouteResponse route)
route
- the terminal route record.protected String toFullyQualifiedTerminalPath(TerminalRouteResponse route, String path)
route
- the terminal route record.path
- API path relative to the root (e.g. "/api/charge")protected boolean isTerminalRouted(ITerminalReference terminalName)
terminalName
- reference to the terminal.protected Object finishTerminalRequest(TerminalRouteResponse route, Object request, org.apache.commons.httpclient.HttpMethod method, Class responseType) throws Exception
route
- the terminal route recordrequest
- the request payload, if put or postmethod
- the HttpMethod prepopulatedresponseType
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object putTerminal(String path, Object request, Class responseType) throws Exception
path
- api path relative to the root (e.g. "/api/charge")request
- the request payload object.responseType
- expected response type.Exception
- exception if any errors occurred processing the request.protected TerminalRequest newTerminalRequestForRoute(TerminalRouteResponse route)
route
- the terminal route record.TerminalRequest
protected Object postTerminal(String path, Object request, Class responseType) throws Exception
path
- api path relative to the root (e.g. "/api/charge")request
- the request payload object.responseType
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object getGateway(String path, boolean test, Class responseType) throws Exception
path
- api path relative to the root (e.g. "/api/heartbeat")test
- whether or not this request should go to the test gatewayresponseType
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object getGateway(String path, boolean test, Class responseType, int requestTimeout) throws Exception
path
- API path relative to the root (e.g. "/api/heartbeat")test
- whether or not this request should go to the test gatewayresponseType
- expected response type.requestTimeout
- timeout for the request in millisecondsException
- exception if any errors occurred processing the request.protected Object getDashboard(String path, ITimeoutRequest request, Class responseType) throws Exception
path
- API path relative to the root (e.g. "/api/heartbeat")request
- the request object.responseType
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object finishGatewayRequest(org.apache.commons.httpclient.HttpMethod method, Class responseType) throws Exception
method
- the HttpMethod to execute.responseType
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object postUpload(String path, UploadMetadata request, InputStream inStream, Class responseClass) throws Exception
path
- API path from root (e.g. "/api/charge")request
- the request object.inStream
- is the upload input streamresponseClass
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object postDashboard(String path, ITimeoutRequest request, Class responseClass) throws Exception
path
- API path from root (e.g. "/api/charge")request
- the request object.responseClass
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object postGateway(String path, ITimeoutRequest request, Class responseClass) throws Exception
path
- API path from root (e.g. "/api/charge")request
- the request object.responseClass
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object putGateway(String path, ITimeoutRequest request, Class responseClass) throws Exception
path
- API path from root (e.g. "/api/charge")request
- the request object.responseClass
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object deleteGateway(String path, ITimeoutRequest request, Class responseClass) throws Exception
path
- API path from root (e.g. "/api/charge")request
- the request object.responseClass
- expected response type.Exception
- exception if any errors occurred processing the request.protected Object deleteDashboard(String path, ITimeoutRequest request, Class responseClass) throws Exception
path
- API path from root (e.g. "/api/charge")request
- the request object.responseClass
- expected response type.Exception
- exception if any errors occurred processing the request.protected String resolveOfflineRouteCacheLocation(String terminalName)
terminalName
- the target terminal name.public TerminalRouteResponse getOfflineCache(String terminalName)
terminalName
- the target terminal name.public String getOfflineRouteCacheLocation()
public void setOfflineRouteCacheLocation(String offlineRouteCacheLocation)
offlineRouteCacheLocation
- offline route cache location.protected String toFullyQualifiedGatewayPath(String path, boolean test)
path
- path relative to the root (e.g. "/api/charge")test
- whether or not this should route to the test transaction.protected String toFullyQualifiedDashboardPath(String path)
path
- path relative to the root (e.g. "/api/charge")public boolean isTerminalHttps()
public void setTerminalHttps(boolean terminalHttps)
terminalHttps
- https flag.Copyright © 2022 BlockChyp, Inc.. All rights reserved.