Sha256: ab22918504541c2794275c9691a058113647926a53514d508e4c4653dff99801

Contents?: true

Size: 802 Bytes

Versions: 14

Compression:

Stored size: 802 Bytes

Contents

require "gerencianet"
require_relative "./credentials"

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

params = {
  id: 1113
}

body = {
  payment: {
    credit_card: {
      payment_token: "e0c210bb679fea225a586256234f8ce179fd16c5",
      billing_address: {
        street: "Av. JK",
        number: 909,
        neighborhood: "Bauxita",
        zipcode: "35400000",
        city: "Ouro Preto",
        state: "MG"
      },
      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_subscription(params: params, body: body)

Version data entries

14 entries across 14 versions & 1 rubygems

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