Compare commits
4 Commits
925002c572
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e8792bc5c | ||
|
|
98707fce2b | ||
|
|
b2ee0fe37f | ||
|
|
b16b9d4fb2 |
10
bbpay.py
10
bbpay.py
@@ -54,7 +54,7 @@ class BBPay(Resource):
|
||||
|
||||
class Register(BBPay):
|
||||
def post(self):
|
||||
data = request.get_json()
|
||||
data = request.get_json(force=True)
|
||||
app.logger.debug(data)
|
||||
body = {
|
||||
'numeroConvenio': getenv("BBPAY_CONVENIO"),
|
||||
@@ -80,7 +80,7 @@ class Register(BBPay):
|
||||
|
||||
class Request(BBPay):
|
||||
def post(self):
|
||||
data = request.get_json()
|
||||
data = request.get_json(force=True)
|
||||
app.logger.debug(data)
|
||||
body = {
|
||||
"geral": {
|
||||
@@ -88,7 +88,7 @@ class Request(BBPay):
|
||||
"pagamentoUnico": True,
|
||||
"descricaoSolicitacao": "P2Pix",
|
||||
"valorSolicitacao": data['amount'],
|
||||
"codigoConciliacaoSolicitacao": data['lockid']
|
||||
#"codigoConciliacaoSolicitacao": data['lockid']
|
||||
},
|
||||
# "devedor": {
|
||||
# "tipoDocumento": 1,
|
||||
@@ -117,7 +117,7 @@ class Request(BBPay):
|
||||
|
||||
class Release(BBPay):
|
||||
def get(self, numeroSolicitacao):
|
||||
app.logger.debug(request.get_json())
|
||||
app.logger.debug(request.get_data(as_text=True))
|
||||
response = self.oauth.get(
|
||||
self.baseUrl+f"/solicitacoes/{numeroSolicitacao}",
|
||||
params=self.params,
|
||||
@@ -167,7 +167,7 @@ api.add_resource(Release, '/release/<int:numeroSolicitacao>')
|
||||
if __name__ == '__main__':
|
||||
if getenv("DEBUG"):
|
||||
disable_warnings()
|
||||
app.run(host='::1',debug=True)
|
||||
app.run(host='::1', debug=True, port=getenv("PORT",5000))
|
||||
else:
|
||||
from waitress import serve
|
||||
serve(app, host=getenv("HOST","::1"), port=getenv("PORT",5000))
|
||||
|
||||
Reference in New Issue
Block a user