timtait / adyen-ruby-api-library

Adyen API Library for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adyen API Library for Ruby

The Adyen API Library for Ruby lets you easily work with Adyen's API.

Requirements

Built for Ruby >= 2.1

Installation

The sole dependency is faraday for http communication - run bundle install to install faraday if you don't already have it

To validate functionality of client, use bundle install --with development and rspec to run mock API tests.

Documentation

Follow the rest of our guides from the documentation on how to use this library.

Usage

Create a client to connect to the Adyen API

require 'adyen'

adyen = Adyen::Client.new

# for API-key based implementations
adyen.api_key = 'AF5XXXXXXXXXXXXXXXXXXXX'

# for basic-auth based implementations
adyen.ws_user = 'ws@Company.Adyen'
adyen.ws_password = 'super_secure_password123'

Make a Payment

adyen.checkout.payments('{
  "amount": {
    "value": 1000,
    "currency": "USD"
  },
  "merchantReference": "your_unqiue_ref",
  "merchantAccount": "YourMerchantAccount",
  "card": {
    "number": 4111111111111111,
    "expiryMonth": "08",
    "expiryYear": "2018",
    "holderName": "Simon Hopper"
  }
}')

Marketpay

The Marketpay sub-services are children of the marketpay member of the initial object, for instance:

adyen.marketpay.account.close_account('{
  "accountCode": "CODE_OF_ACCOUNT"
}')

Validation

Requests are checked to make sure that all top-level required fields are present. In addition, the presence of the correct method of authentication is confirmed before making the API call (wrong credentials are not caught).

List of supported methods

checkout:

  • payment_session
  • payments.result
  • payment_methods
  • payments
  • payments.details

checkout utility:

  • origin_keys

payments:

  • authorise
  • authorise3d

modifications:

  • capture
  • cancel
  • refund
  • cancel_or_refund
  • adjust_authorisation

payouts:

  • confirm_third_party
  • decline_third_party
  • store_detail
  • submit_third_party
  • store_detail_and_submit_third_party

recurring:

  • list_recurring_details
  • disable
  • store_token

marketpay.account:

  • create_account_holder
  • get_account_holder
  • update_account_holder
  • update_account_holder_state
  • suspend_account_holder
  • un_suspend_account_holder
  • close_account_holder
  • create_account
  • update_account
  • close_account
  • upload_document
  • get_uploaded_documents
  • delete_bank_accounts
  • delete_shareholders

marketpay.fund:

  • account_holder_balance
  • account_holder_transaction_list
  • payout_account_holder
  • transfer_funds
  • setup_beneficiary
  • refund_not_paid_out_transfers

marketpay.notification:

  • create_notification_configuration
  • get_notification_configuration
  • get_notification_configuration_list
  • test_notification_configuration
  • update_notification_configuration
  • delete_notification_configurations

Support

If you have any problems, questions or suggestions, create an issue here or send your inquiry to support@adyen.com.

Licence

MIT license. For more information, see the LICENSE file.

About

Adyen API Library for Ruby

License:MIT License


Languages

Language:Ruby 99.5%Language:Shell 0.5%