filmov
tv
Webhook para pagamentos API Pix Java/Python - Gerencianet

Показать описание
Neste vídeo vamos implementar um webhook para receber as notificações de
pagamentos pela API-Pix da Gerencianet. A Gerencianet é um PSP (Payment Service Provider) que oferece uma API muito simples e com diversas funcionalidades para gestão de pagamentos digitais.
De forma resumida, vamos:
-Configurar o Servidor em Python,
-Criar o webhook em Java,
-Autenticar, gerar cobrança, emitir QrCode (também em Java),
-Pagar e esperar a confirmação no nosso Servidor Python.
----------RESUMO--------------
Server na DIGITAL OCEAN - DO
Gerar DNS no CLOUD-DNS
Gerar certificado CERTBOOT
Configurar Python na DO
Rodar aplicação Java com webhook
Rodar aplicação Java para gerar cobrança
Pagar
Projeto Server Python e Client Python
Projeto Client Java
-----------------------
Um ponto bastante importante da implementação do Servidor em Python (ou qualquer outra linguagem) é a configuração dos certificados. São 3 arquivos que vamos utilizar:
Estes 3 arquivos devem ser informados no seu código. No exemplo apresentado no vídeo e disponível no github isso foi feito nas linhas 33, 35 e 36.
Já no aplicativo cliente, em Java você deve indicar o arquivo com extensão p12 que é seu certificado obtido com a equipe de suporte da Gerencianet.
No cliente em Python o arquivo a ser indicado no seu código é o arquivo com extensão .pem que é seu certificado convertido com o comando:
-----------------------
Dicas na Digital Ocean
Create Droplets, Debian 10
-----------------------
Dicas para gerar DNS free (só pode ter um DNS por conta)
Criar dois registros A:
-----------------------
Dicas para instalar Apache
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install apache2
sudo service apache2 restart
sudo systemctl status apache2
-----------------------
Dicas certboot
Apache Debian 10
sudo apt install snapd
sudo snap install core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
--
sudo apt-get install python-certbot-apache
sudo certbot --apache
Y
Y
- Congratulations! Your certificate and chain have been saved at:
Your key file has been saved at:
Your certificate will expire on 2021-05-05. To obtain a new or
tweaked version of this certificate in the future, simply run
certbot again with the "certonly" option. To non-interactively
renew *all* of your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
----
-----------------------
Instalar Python na DO
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev
cd Python-3.8.2
./configure --enable-optimizations
make -j 4
sudo make altinstall
python3.8 --version
apt-get install python-flask
sudo apt install python3-pip
python3 -m pip list
python3 -m pip install flask
cd my_app
==================
👍👉treinamento Java Fundamentos & Práticas👈👍
☝
===================
📽📽Vídeos sobre livros TOP 📽📽
pagamentos pela API-Pix da Gerencianet. A Gerencianet é um PSP (Payment Service Provider) que oferece uma API muito simples e com diversas funcionalidades para gestão de pagamentos digitais.
De forma resumida, vamos:
-Configurar o Servidor em Python,
-Criar o webhook em Java,
-Autenticar, gerar cobrança, emitir QrCode (também em Java),
-Pagar e esperar a confirmação no nosso Servidor Python.
----------RESUMO--------------
Server na DIGITAL OCEAN - DO
Gerar DNS no CLOUD-DNS
Gerar certificado CERTBOOT
Configurar Python na DO
Rodar aplicação Java com webhook
Rodar aplicação Java para gerar cobrança
Pagar
Projeto Server Python e Client Python
Projeto Client Java
-----------------------
Um ponto bastante importante da implementação do Servidor em Python (ou qualquer outra linguagem) é a configuração dos certificados. São 3 arquivos que vamos utilizar:
Estes 3 arquivos devem ser informados no seu código. No exemplo apresentado no vídeo e disponível no github isso foi feito nas linhas 33, 35 e 36.
Já no aplicativo cliente, em Java você deve indicar o arquivo com extensão p12 que é seu certificado obtido com a equipe de suporte da Gerencianet.
No cliente em Python o arquivo a ser indicado no seu código é o arquivo com extensão .pem que é seu certificado convertido com o comando:
-----------------------
Dicas na Digital Ocean
Create Droplets, Debian 10
-----------------------
Dicas para gerar DNS free (só pode ter um DNS por conta)
Criar dois registros A:
-----------------------
Dicas para instalar Apache
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install apache2
sudo service apache2 restart
sudo systemctl status apache2
-----------------------
Dicas certboot
Apache Debian 10
sudo apt install snapd
sudo snap install core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
--
sudo apt-get install python-certbot-apache
sudo certbot --apache
Y
Y
- Congratulations! Your certificate and chain have been saved at:
Your key file has been saved at:
Your certificate will expire on 2021-05-05. To obtain a new or
tweaked version of this certificate in the future, simply run
certbot again with the "certonly" option. To non-interactively
renew *all* of your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
----
-----------------------
Instalar Python na DO
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev
cd Python-3.8.2
./configure --enable-optimizations
make -j 4
sudo make altinstall
python3.8 --version
apt-get install python-flask
sudo apt install python3-pip
python3 -m pip list
python3 -m pip install flask
cd my_app
==================
👍👉treinamento Java Fundamentos & Práticas👈👍
☝
===================
📽📽Vídeos sobre livros TOP 📽📽
Комментарии