Simplify Node.js API Docs

API Docs for:
Show:

Payments Class

Defined in: lib/payments.js:28

This module exposes the different domain object on which different API calls can be invoked upon.

Methods

areAPIKeysSet

(
  • auth
  • callback
)
Boolean private

Defined in lib/payments.js:206

Function to check whether the user's API keys are set or not.

Parameters:

  • auth Object

    An object containing the public & private API keys

  • callback Function

    A callback function to handle an errors

Returns:

Boolean:

Returns true if both public & private API keys are set

execute

(
  • auth
  • domainType
  • action
  • params
  • callback
)

Defined in lib/payments.js:76

Function to execute an API call.

Parameters:

  • auth Object

    An object containing the public & private API keys

  • domainType String

    The type of domain object e.g. 'payment'

  • action String

    The type of action being invoked on the domain object

  • params Object

    The request paramaters

  • callback Function

    A callback function to handle an success/error responses from the API

getAccessTokenParams

(
  • action
  • params
)
String private

Defined in lib/payments.js:230

Function to get the Oauth params.

Parameters:

  • action String

    The type of action being invoked on the domain object

  • params Object

    The request paramaters

Returns:

String:

Returns url query parameter string

getAccessTokenURI

(
  • action
)
Object private

Defined in lib/payments.js:259

Function to build up the URI endpoint to use in the request for all AccessToken functionality.

Parameters:

  • action String

    The type of action being invoked on the domain object

Returns:

Object:

Returns a URI object neeeded for a HTTP request

getHTTPMethod

(
  • action
)
String private

Defined in lib/payments.js:398

Function to choose the appropiate HTTP method based on the API action.

Parameters:

  • action String

    The type of action being invoked on the domain object

Returns:

String:

Returns a HTTP request type e.g. 'POST'

getRequestOptions

(
  • httpMethod
  • signature
  • uri
)
Object private

Defined in lib/payments.js:362

Function to construct the opitons map needed for the API request.

Parameters:

  • httpMethod String

    The type of HTTP request being made e.g. 'POST'

  • signature String

    A generated JSON Web Signature

  • uri Object

    An object containing the properties of a URI

Returns:

Object:

Returns an object with the option paramaters neeeded for a HTTP request

getURI

(
  • publicKey
  • domainType
  • action
  • params
)
Object private

Defined in lib/payments.js:287

Function to build up the URI endpoint to use in the request.

Parameters:

  • publicKey String

    The public API key of the user

  • domainType String

    The type of domain object e.g. 'payment'

  • action String

    The type of action being invoked on the domain object

  • params Object

    The request paramaters

Returns:

Object:

Returns a URI object neeeded for a HTTP request

jwsDecode

(
  • auth
  • params
  • errorHandler
)

Defined in lib/payments.js:163

Function to decode a signature of a Webhook event returned by Simplify.

Parameters:

  • auth Object

    An object containing the public & private API keys

  • params Object

    The request paramaters

  • errorHandler Function

    A callback function to handle an success/error responses from the API

Properties

API_BASE_LIVE_URL

String

Defined in lib/payments.js:46

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

Defined in lib/payments.js:56

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

Defined in lib/payments.js:66

My property description. Like other pieces of your comment blocks, this can span multiple lines.

Default: Constants.OAUTH_BASE_URL value