
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Wrapper de integração com a API v2 do Banco Inter.
Adicionar inter_api no Gemfile:
gem 'inter_api'
ou
bundle add inter_api
Instalar a gem:
bin/rails generate inter_api:install
# Instanciar o API client
api_client = InterApi::Client.new(crt: "./certificado_api_inter.crt", key: "./chave_api_inter.key", client_id: "123456", client_secret: "abcde", chave_pix: "1011121314", conta_corrente: "9876", scopes: "cobv.write cobv.read cob.write cob.read pix.write pix.read")
# É possível passar o parâmetro "test_mode" na instanciação do client, que vai definir se ele vai usar ambiente de teste ou produção. Por padrão é "false" (produção).
# Ao instanciar o objeto, cria um access_token e/ou valida a partir da data de expiração
# Criar um pagamento
response = api_client.create_payment(amount: 50.00, payer_tax_id: "123.123.123-01", payer_name: "João da Silva", expiration: 3600, solicitacao_pagador: "Compra de produto", info_adicionais: [ nome: "Produto", valor: "Produto 1"])
# retorna um objeto <Ac::AcObject>
puts response.txid # "123123"
puts response.status # "ATIVA"
# Obter um pagamento a partir do id
response = api_client.get_payment(payment.txid)
# retorna um objeto <Ac::AcObject>
puts response.txid # "123123"
puts response.status # "ATIVA"
# Atualizar um pagamento
response = api_client.update_payment(payment_id: payment.txid, status: "REMOVIDA_PELO_USUARIO_RECEBEDOR")
# retorna o objeto <Ac::AcObject> com o pagamento atualizado
puts response.status # "REMOVIDA_PELO_USUARIO_RECEBEDOR"
# Reebolso de pagamento
response = api_client.refund_payment(end_to_end_id: "123", amount: 50.00, refund_nature: "ORIGINAL", description: "Reembolso")
# retorna um objeto <Ac::AcObject>
response.status # "EM_PROCESSAMENTO"
FAQs
Unknown package
We found that inter_api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.