IdPayDriver

new IdPayDriver()

Class that provides methods to interact with the IdPay API.

Methods

(async) request(dataInput) → {Promise.<TransactionCreateResponseIdPay>}

Request method to create a transaction.
Parameters:
NameTypeDescription
dataInputTransactionCreateInputIdPayInput data for creating the transaction.
Returns:
Response from the IdPay API for creating a transaction.
Type: 
Promise.<TransactionCreateResponseIdPay>

(async) request(dataInput) → {Promise.<TransactionCreateResponseIdPay>}

Request method to create a transaction.
Parameters:
NameTypeDescription
dataInputTransactionCreateInputIdPayInput data for creating the transaction.
Returns:
Response from the IdPay API for creating a transaction.
Type: 
Promise.<TransactionCreateResponseIdPay>

setSandBox(sandBox) → {this}

Set whether to use the sandbox environment or not.
Parameters:
NameTypeDescription
sandBoxbooleanTrue to use sandbox, false otherwise.
Returns:
Instance of IdPayDriver.
Type: 
this

setSandBox(sandBox) → {this}

Set whether to use the sandbox environment or not.
Parameters:
NameTypeDescription
sandBoxbooleanTrue to use sandbox, false otherwise.
Returns:
Instance of IdPayDriver.
Type: 
this

setToken(token) → {this}

Set the API token for authentication.
Parameters:
NameTypeDescription
tokenstringThe API token.
Returns:
Instance of IdPayDriver.
Type: 
this

setToken(token) → {this}

Set the API token for authentication.
Parameters:
NameTypeDescription
tokenstringThe API token.
Returns:
Instance of IdPayDriver.
Type: 
this

(async) verify(dataInput) → {Promise.<TransactionVerifyResponseIdPay>}

Verify method to verify a transaction.
Parameters:
NameTypeDescription
dataInputTransactionVerifyInputIdPayInput data for verifying the transaction.
Returns:
Response from the IdPay API for verifying a transaction.
Type: 
Promise.<TransactionVerifyResponseIdPay>

(async) verify(dataInput) → {Promise.<TransactionVerifyResponseIdPay>}

Verify method to verify a transaction.
Parameters:
NameTypeDescription
dataInputTransactionVerifyInputIdPayInput data for verifying the transaction.
Returns:
Response from the IdPay API for verifying a transaction.
Type: 
Promise.<TransactionVerifyResponseIdPay>