Skip to content

maddevsio/paybox_api

Repository files navigation

PayboxApi Developed in Maddevs Build Status Gem Version

Installation

Add this line to your application's Gemfile:

gem 'paybox_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install paybox_api

Usage

# config/secrets.yml

development:
  paybox:
    merchant_id: YOUR_MERCHANT_ID
    secret_key: YOUR_SECRET_KEY

# app/controllers/application_controller.rb

include PayboxService

def paybox_client
  PayboxApi.init_client(**Rails.application.secrets.paybox)
end

# using

paybox_client.payments order: uniq_order_id,
  amount: amount,
  currency: 'RUB',
  description: description,
  uuid: payment_uuid,
  options: {
    callbacks: {
      success_url: success_url,
      failure_url: failure_url
    },
    user: {
      email: user.email
    }
  }

Stub payment request

# RSpec

before { stub_payment }

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/maddevsio/paybox_api.

License

The gem is available as open source under the terms of the MIT License.

About

Paybox API wrapper (version 4.0+)

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published