Giter VIP home page Giter VIP logo

moip-transparente's Introduction

Moip::Transparente

Gem para integração com checkout transparente do MOIP

Instalação

Coloque no seu Gemfile

    gem 'moip-transparente'

Rode:

    $ bundle

Ou instale manualmente

    $ gem install moip-transparente

Como usar

Crie uma instancia de Moip::Checkout no controller

@moip = Moip::Checkout.new

invoice = {
  :razao => 'Fatura XXX',
  :id => 1,
  :total => '10.55',
  :acrescimo => '0.00',
  :desconto => '0.00',      
  :cliente => {
    :id => 1,
    :nome => 'Bob Sponja Calça Quadrada',
    :email => '[email protected]',
    :logradouro => 'Rua X',
    :complemento => 'Qd 11 Lt 2323',
    :bairro => 'Solta Gato',
    :cidade => 'Caixa Prego',
    :uf => 'BA',
    :cep => '00124-11',
    :telefone => '(55) 5555-5555'
  },
  :parcelamentos => [
    {:minimo => 1, :maximo => 10, :repassar => true}
  ]
}

# requisite o token
@moip.get_token(invoice)

View

<%= @moip.javascript_tag %> # Vai gerar o include do Javascript

<%= @moip.widget_tag('paymentSucess', 'paymentFail') %> # Vai gerar o a div do javascript com as funções

Contribuições

  1. Faça um fork
  2. Crie um novo branch (git checkout -b my-new-feature)
  3. Commit suas alterações (git commit -am 'Added some feature')
  4. Faça um push (git push origin my-new-feature)
  5. Solicite o pull

moip-transparente's People

Contributors

brunofrank avatar cristhiano avatar

Watchers

James Cloos avatar  avatar  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.