Project

paybox_api

0.0
No commit activity in last 3 years
No release in over 3 years
Paybox API wrapper for version 3.3+
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0
~> 3.0

Runtime

 Project Readme

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.