Sha256: d9c2a272f245d955a82ffd876f182fdbda590863a3e8cde6c8e021693061d2fa

Contents?: true

Size: 717 Bytes

Versions: 2

Compression:

Stored size: 717 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
}

params = {
    txid: " "
}

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_charge(params: params, body: body)

Version data entries

2 entries across 2 versions & 1 rubygems

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