GithubHelp home page GithubHelp logo

compropago-ruby's Introduction

Compropago

This gem helps you integrate ComproPago's API to your ruby app.

Installation

Add this line to your application's Gemfile:

gem 'compropago', '~> 0.1.2'

And then execute:

$ bundle

Or install it yourself as:

$ gem install compropago

Usage

Authentication

We encourage you to set your API keys in an environment variable rather than hardcoding your API keys.

 Compropago.api_key = "sk_test_my_api_key"

Once you have created an instance of compropago, you can call the methods described in the api reference on it.

Examples

Create a charge

Creating a charge using only the required params order_price, order_name, customer_name, customer_email, payment_type.

 Compropago::Charge.create({ order_price: 10000.0,
                             order_name: "SAMSUNG GOLD CURL",
                             customer_name: "Roberto Miranda",
                             customer_email: "[email protected]",
                             payment_type: "OXXO"})

Verify a charge

Verify a charge previously made.

Compropago::Charge.find("818f2e81-226a-4ff9-88a2-81a577aec380")

SMS payment instructions

Send payment instructions over SMS.

Compropago::SMS.create(payment_id: "818f2e81-226a-4ff9-88a2-81a577aec380", customer_phone: "2221515805", customer_company_phone: "TELCEL")

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

compropago-ruby's People

Contributors

jogam5 avatar robertomiranda avatar waldix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.