1.30.4 • Published 6 years ago

adyen-api-js v1.30.4

Weekly downloads
2,348
License
Apache-2.0
Repository
github
Last release
6 years ago

adyen-api-js

AdyenApiJs - JavaScript client for adyen-api-js Operations about payments, recurring and payout This SDK is automatically generated by the Swagger Codegen project:

  • API version: 30
  • Package version: 1.30.4
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install adyen-api-js --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your adyen-api-js from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('adyen-api-js') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var AdyenApiJs = require('adyen-api-js');

var defaultClient = AdyenApiJs.ApiClient.instance;

// Configure HTTP basic authorization: auth
var auth = defaultClient.authentications['auth'];
auth.username = 'YOUR USERNAME'
auth.password = 'YOUR PASSWORD'

var api = new AdyenApiJs.PaymentApi()

var modificationRequest = new AdyenApiJs.ModificationRequest(); // {ModificationRequest} The Modification Request

api.adjustAuthorisation(modificationRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://pal-test.adyen.com/pal/servlet

ClassMethodHTTP requestDescription
AdyenApiJs.PaymentApiadjustAuthorisationPOST /Payment/v30/adjustAuthorisationIncrease or decrease the authorised amount
AdyenApiJs.PaymentApiauthorisePOST /Payment/v30/authoriseCreates a payment authorisation
AdyenApiJs.PaymentApiauthorise3dPOST /Payment/v30/authorise3dCompletes a 3-D Secure payment authorisation
AdyenApiJs.PaymentApicancelPOST /Payment/v30/cancelCancels a payment authorisation
AdyenApiJs.PaymentApicancelOrRefundPOST /Payment/v30/cancelOrRefundDisable a stored payment detail
AdyenApiJs.PaymentApicapturePOST /Payment/v30/captureCaptures a payment authorisation
AdyenApiJs.PaymentApirefundPOST /Payment/v30/refundRefunds a payment
AdyenApiJs.PayoutApiconfirmPOST /Payout/v30/confirmThirdPartyConfirm a payout
AdyenApiJs.PayoutApideclinePOST /Payout/v30/declineThirdPartyDecline a payout
AdyenApiJs.PayoutApistoreDetailAndSubmitPOST /Payout/v30/storeDetailAndSubmitThirdPartyStore the payouts details and make a payout request
AdyenApiJs.RecurringApidisablePOST /Recurring/v30/disableDisable a stored payment detail
AdyenApiJs.RecurringApilistRecurringDetailsPOST /Recurring/v30/listRecurringDetailsRetrieves stored payment details for a shopper

Documentation for Models

Documentation for Authorization

auth

  • Type: HTTP basic authentication
1.30.4

6 years ago

1.30.3

6 years ago

1.30.2

6 years ago

1.30.1

7 years ago

1.30.0

7 years ago

1.25.4

7 years ago

1.25.3

7 years ago

1.25.2

7 years ago

1.25.1

7 years ago

1.25.0

7 years ago

1.18.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

1.18.0

7 years ago