Sha256: bf79ab48cf0fc0e8e776f3f03c0a8923ef201d799e3b374d55b195d7bf7a0f3a

Contents?: true

Size: 835 Bytes

Versions: 1

Compression:

Stored size: 835 Bytes

Contents

require "gerencianet"
require_relative "./credentials"

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

body = {
  payment: {
    credit_card: {
      installments: 1,
      payment_token: "5739b06925244dd1ab8e0afa62389d5fb4ea2945",
      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: "94271564656",
        birth: "1977-01-15",
        phone_number: "5144916523"
      }
    }
  }
}

params = {
  id: 2366
}

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gerencianet-1.0.0 examples/default/charge/create_card_payment.rb