Sha256: f19d030fa9aee6b64612c27ae49ce72be969d4052e8dc18b2bca16e2e7e3fb47

Contents?: true

Size: 621 Bytes

Versions: 12

Compression:

Stored size: 621 Bytes

Contents

require "gerencianet"
require "date"
require_relative "./credentials"

options = {
  client_id: CREDENTIALS::CLIENT_ID,
  client_secret: CREDENTIALS::CLIENT_SECRET,
  sandbox: true
}

tomorrow = Date.today + 1

params = {
  id: 2365
}

body = {
  payment: {
    banking_billet: {
      expire_at: tomorrow.strftime,
      customer: {
        name: "Gorbadoc Oldbuck",
        email: "oldbuck@gerencianet.com.br",
        cpf: "04267484171",
        birth: "1977-01-15",
        phone_number: "5144916523"
      }
    }
  }
}

gerencianet = Gerencianet.new(options)
puts gerencianet.pay_charge(params: params, body: body)

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gerencianet-0.0.13 examples/create_billet_payment.rb
gerencianet-0.0.12 examples/create_billet_payment.rb
gerencianet-0.0.11 examples/create_billet_payment.rb
gerencianet-0.0.10 examples/create_billet_payment.rb
gerencianet-0.0.9 examples/create_billet_payment.rb
gerencianet-0.0.8 examples/create_billet_payment.rb
gerencianet-0.0.7 docs/examples/create_billet_payment.rb
gerencianet-0.0.6 docs/examples/create_billet_payment.rb
gerencianet-0.0.5 docs/examples/create_billet_payment.rb
gerencianet-0.0.4 docs/examples/create_billet_payment.rb
gerencianet-0.0.3 docs/examples/create_billet_payment.rb
gerencianet-0.0.2 docs/examples/create_billet_payment.rb