com.github.GBSEcom.simple.VerificationApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of first-data-gateway Show documentation
Show all versions of first-data-gateway Show documentation
Java SDK to be used with a First Data Gateway account. This SDK has been created and packaged to offer the easiest way to integrate your application into the First Data Gateway. This SDK gives you the ability to run transactions such as sales, preauthorizations, postauthorizations, credits, voids, and returns; transaction inquiries; setting up scheduled payments and much more.
package com.github.GBSEcom.simple;
import com.github.GBSEcom.client.ApiException;
import com.github.GBSEcom.model.CardVerificationRequest;
import com.github.GBSEcom.model.AccountVerificationRequest;
import com.github.GBSEcom.model.TransactionResponse;
public interface VerificationApi {
TransactionResponse verifyCard(CardVerificationRequest payload, String region);
TransactionResponse verifyCard(CardVerificationRequest payload);
TransactionResponse verifyAcct(AccountVerificationRequest payload, String region);
TransactionResponse verifyAcct(AccountVerificationRequest payload);
}
class VerificationApiImpl extends ApiWrapper implements VerificationApi {
public VerificationApiImpl(final ClientContext context) {
super(context, com.github.GBSEcom.api.VerificationApi::new);
}
public TransactionResponse verifyCard(final CardVerificationRequest payload, final String region) throws ApiException {
final ClientHeaders headers = genHeaders(payload);
return getClient().verifyCard(
headers.getContentType(),
headers.getClientRequestId(),
headers.getApiKey(),
headers.getTimestamp(),
payload,
headers.getMessageSignature(),
region
);
}
public TransactionResponse verifyCard(final CardVerificationRequest payload) throws ApiException {
return verifyCard(payload, getDefaultRegion());
}
public TransactionResponse verifyAcct(final AccountVerificationRequest payload, final String region) throws ApiException {
final ClientHeaders headers = genHeaders(payload);
return getClient().verifyAccount(
headers.getContentType(),
headers.getClientRequestId(),
headers.getApiKey(),
headers.getTimestamp(),
payload,
headers.getMessageSignature(),
region
);
}
public TransactionResponse verifyAcct(final AccountVerificationRequest payload) throws ApiException {
return verifyAcct(payload, getDefaultRegion());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy