Adyen Client
Adyen client
Getting started
Install the module with: npm install adyen-client
var adyenClient = var aClient = ; aClient ;
Documentation
First of all you need to initialize the client passing your merchant account, username, password and front end key (only if you need to do the frontend initialization).
var adyenClient = ; /* opts = { frontKey: 'YOUR FRONT END KEY', //Only used for the initCCForm merchantAccount: 'YOUR MERCHANT ACCOUNT' username: 'YOUR USERNAME', password: 'YOUR PASSWORD' version: 'VERSION', // URL versions by default is v12 development: Boolean //TRUE or FALSE indicates that your are on development, for production is not neccesary } */var aClient = ;
Then you have the client initialized, now you have access to this methods, every method return a promise, and you need to follow the adyen documentation to know how pass the data:
-
initCCForm: Promise that returns the structure you need for the CSE encryption in frontend.
aClient; -
authorizePayment
aClient; -
authorize3dPayment
aClient -
getRecurringData
aClient; -
disableRecurring
aClient; -
capture
aClient; -
refund
aClient; -
cancelOrRefund:
aClient;
Responses
The initCCForm returns the data example and the others returns this:
success: Boolean //TRUE or FALSE data: {}//The Response from Adyen lastResponse: {} //Axios RAW response lastRequest: {} //Axios RAW request
Development
Run npm install;npm run dev
to watch the proyect, and compile the code automatically.
Run npm build
to build the module.
Release History
(2.0.11)
- Update dependecies (Axios ^0.18)
- Added posibility to pass the version in the contructor
(2.0.10)
- Update dependecies (Axios ^0.16)
- Added
authorize3dPayment
for handling 3D Secure authorization (Thanks @grimor)
(2.0.7)
- Update dependencies
- Added success field in response
- Fix issues
- Internal refractor (ES6)
- Docs Changed
- Responses now returns the RAW request, and response
(1.0.8)
- Internal Refactor
- Added more methods
- Better docs
(1.0.7)
- Fix dependencies
- Firsts step.
- Added basic methods
License
Licensed under the MIT license. 2018