public class AmazonPayClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected PayConfiguration |
payConfiguration |
protected RequestSigner |
requestSigner |
| Constructor and Description |
|---|
AmazonPayClient(PayConfiguration payConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
AmazonPayResponse |
callAPI(URI uri,
String httpMethodName,
Map<String,List<String>> queryParameters,
String request,
Map<String,String> header)
API to process the request and return the
|
AmazonPayResponse |
deliveryTracker(net.sf.json.JSONObject payload)
The Delivery Tracker operation is used to track the delivery status
|
AmazonPayResponse |
deliveryTracker(net.sf.json.JSONObject payload,
Map<String,String> header)
The Delivery Tracker operation is used to track the delivery status
|
String |
generateButtonSignature(net.sf.json.JSONObject payload)
generateButtonSignature is a convenience method to assist the developer in generating static signatures
that can be used by Checkout v2's amazon.Pay.renderButton method.
|
String |
generateButtonSignature(String payload)
generateButtonSignature is a convenience method to assist the developer in generating static signatures
that can be used by Checkout v2's amazon.Pay.renderButton method.
|
AmazonPayResponse |
getAuthorizationToken(String mwsAuthToken,
String merchantId,
Map<String,String> header)
The get Authorization Token operation is used to obtain retrieve a delegated authorization token
used in order to make API calls on behalf of a merchant.
|
protected final PayConfiguration payConfiguration
protected final RequestSigner requestSigner
public AmazonPayClient(PayConfiguration payConfiguration) throws AmazonPayClientException
AmazonPayClientExceptionpublic AmazonPayResponse deliveryTracker(net.sf.json.JSONObject payload, Map<String,String> header) throws AmazonPayClientException
payload - JSONObject request bodyheader - Map<String, String> containining key-value pair of required headers (e.g., keys such as x-amz-pay-idempotency-key, x-amz-pay-authtoken)AmazonPayClientException - When an error response is returned by Amazon Pay due to bad request or other issuepublic AmazonPayResponse getAuthorizationToken(String mwsAuthToken, String merchantId, Map<String,String> header) throws AmazonPayClientException
mwsAuthToken - MWS Authorization Token previously shared by Merchant to the Solution ProvidermerchantId - Merchant ID that generated the MWS Authorization Tokenheader - Map<String, String> containining key-value pair of required headers (e.g., keys such as x-amz-pay-idempotency-key, x-amz-pay-authtoken)AmazonPayClientException - When an error response is returned by Amazon Pay due to bad request or other issueAmazonPayClient,
PayConfiguration,
Environmentpublic AmazonPayResponse deliveryTracker(net.sf.json.JSONObject payload) throws AmazonPayClientException
payload - JSONObject request bodyAmazonPayClientException - When an error response is returned by Amazon Pay due to bad request or other issuepublic String generateButtonSignature(net.sf.json.JSONObject payload) throws AmazonPayClientException
payload - The payloadJSON attribute from createCheckoutSessionConfig object used by amazon.Pay.renderButton method from checkout.jsAmazonPayClientException - When an error response is returned by Amazon Pay due to bad request or other issuepublic String generateButtonSignature(String payload) throws AmazonPayClientException
payload - The payloadJSON attribute from createCheckoutSessionConfig object used by amazon.Pay.renderButton method from checkout.jsAmazonPayClientException - When an error response is returned by Amazon Pay due to bad request or other issuepublic AmazonPayResponse callAPI(URI uri, String httpMethodName, Map<String,List<String>> queryParameters, String request, Map<String,String> header) throws AmazonPayClientException
uri - The uri that needs to be executedhttpMethodName - the HTTP request method(GET,PUT,POST etc) to be usedqueryParameters - the query parameters maprequest - the payload to be sent with the requestheader - the header of the solution providerAmazonPayClientException - When an error response is returned by Amazon Pay due to bad request or other issueCopyright © 2020. All rights reserved.