Sha256: 628a565fb09e5b3d714c0dc53b011ae0bf5e10ff19da9c076f958b9be1098807

Contents?: true

Size: 679 Bytes

Versions: 2

Compression:

Stored size: 679 Bytes

Contents

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

require "uri"
require "net/http"
require "openssl"

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

body = {
    calendario: {
        expiracao: 3600
    },
    devedor: {
        cpf: "12345678909",
        nome: "Francisco da Silva"
    },
    valor: {
        original: "0.01"
    },
    chave: "sua_chave",
    solicitacaoPagador: "Cobrança dos serviços prestados."
}

gerencianet = Gerencianet.new(options)
puts gerencianet.pix_create_immediate_charge(body: body)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gerencianet-1.0.2 examples/pix/charge/pix_create_immediate_charge.rb
gerencianet-1.0.0 examples/pix/charge/pix_create_immediate_charge.rb