Payments Class
This module exposes the different domain object on which different API calls can be invoked upon.
Item Index
Methods
Properties
Methods
areAPIKeysSet
-
auth
-
callback
Function to check whether the user's API keys are set or not.
Parameters:
-
auth
ObjectAn object containing the public & private API keys
-
callback
FunctionA callback function to handle an errors
Returns:
Returns true if both public & private API keys are set
execute
-
auth
-
domainType
-
action
-
params
-
callback
Function to execute an API call.
Parameters:
-
auth
ObjectAn object containing the public & private API keys
-
domainType
StringThe type of domain object e.g. 'payment'
-
action
StringThe type of action being invoked on the domain object
-
params
ObjectThe request paramaters
-
callback
FunctionA callback function to handle an success/error responses from the API
getAccessTokenParams
-
action
-
params
Function to get the Oauth params.
Parameters:
-
action
StringThe type of action being invoked on the domain object
-
params
ObjectThe request paramaters
Returns:
Returns url query parameter string
getAccessTokenURI
-
action
Function to build up the URI endpoint to use in the request for all AccessToken functionality.
Parameters:
-
action
StringThe type of action being invoked on the domain object
Returns:
Returns a URI object neeeded for a HTTP request
getHTTPMethod
-
action
Function to choose the appropiate HTTP method based on the API action.
Parameters:
-
action
StringThe type of action being invoked on the domain object
Returns:
Returns a HTTP request type e.g. 'POST'
getRequestOptions
-
httpMethod
-
signature
-
uri
Function to construct the opitons map needed for the API request.
Parameters:
-
httpMethod
StringThe type of HTTP request being made e.g. 'POST'
-
signature
StringA generated JSON Web Signature
-
uri
ObjectAn object containing the properties of a URI
Returns:
Returns an object with the option paramaters neeeded for a HTTP request
getURI
-
publicKey
-
domainType
-
action
-
params
Function to build up the URI endpoint to use in the request.
Parameters:
-
publicKey
StringThe public API key of the user
-
domainType
StringThe type of domain object e.g. 'payment'
-
action
StringThe type of action being invoked on the domain object
-
params
ObjectThe request paramaters
Returns:
Returns a URI object neeeded for a HTTP request
jwsDecode
-
auth
-
params
-
errorHandler
Function to decode a signature of a Webhook event returned by Simplify.
Parameters:
-
auth
ObjectAn object containing the public & private API keys
-
params
ObjectThe request paramaters
-
errorHandler
FunctionA callback function to handle an success/error responses from the API
Properties
API_BASE_LIVE_URL
String
My property description. Like other pieces of your comment blocks, this can span multiple lines.
Default: Constants.API_BASE_LIVE_URL value
API_BASE_SANDBOX_URL
String
My property description. Like other pieces of your comment blocks, this can span multiple lines.
Default: Constants.API_BASE_SANDBOX_URL value
OAUTH_BASE_URL
String
My property description. Like other pieces of your comment blocks, this can span multiple lines.
Default: Constants.OAUTH_BASE_URL value