add debug logs
This commit is contained in:
10
bbpay.py
10
bbpay.py
@@ -62,6 +62,7 @@ class Register(BBPay):
|
|||||||
'tipoConta': data['tipoConta'],
|
'tipoConta': data['tipoConta'],
|
||||||
'codigoIspb': data['codigoIspb'] # Código identificador do Sistema de Pagamentos Brasileiro. Atualmente aceitamos apenas Banco do Brasil, codigoIspb igual a 0
|
'codigoIspb': data['codigoIspb'] # Código identificador do Sistema de Pagamentos Brasileiro. Atualmente aceitamos apenas Banco do Brasil, codigoIspb igual a 0
|
||||||
}
|
}
|
||||||
|
app.logger.debug(body)
|
||||||
response = self.oauth.post(
|
response = self.oauth.post(
|
||||||
self.baseUrl+"/participantes",
|
self.baseUrl+"/participantes",
|
||||||
params=self.params,
|
params=self.params,
|
||||||
@@ -69,7 +70,8 @@ class Register(BBPay):
|
|||||||
verify=self.verify_ssl,
|
verify=self.verify_ssl,
|
||||||
cert=self.cert)
|
cert=self.cert)
|
||||||
if response.status_code != 201:
|
if response.status_code != 201:
|
||||||
return 'Upstream error', response.status_code
|
app.logger.debug(response._content)
|
||||||
|
return response.reason, response.status_code
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
class Request(BBPay):
|
class Request(BBPay):
|
||||||
@@ -103,7 +105,8 @@ class Request(BBPay):
|
|||||||
verify=self.verify_ssl,
|
verify=self.verify_ssl,
|
||||||
cert=self.cert)
|
cert=self.cert)
|
||||||
if response.status_code != 201:
|
if response.status_code != 201:
|
||||||
return 'Upstream error', response.status_code
|
app.logger.debug(response._content)
|
||||||
|
return response.reason, response.status_code
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
class Release(BBPay):
|
class Release(BBPay):
|
||||||
@@ -114,7 +117,8 @@ class Release(BBPay):
|
|||||||
verify=self.verify_ssl,
|
verify=self.verify_ssl,
|
||||||
cert=self.cert)
|
cert=self.cert)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
return 'Upstream error', response.status_code
|
app.logger.debug(response._content)
|
||||||
|
return response.reason, response.status_code
|
||||||
data = response.json()
|
data = response.json()
|
||||||
numeroParticipante = data['repasse']['recebedores'][0]['identificadorRecebedor']
|
numeroParticipante = data['repasse']['recebedores'][0]['identificadorRecebedor']
|
||||||
pixTimestamp = encode_packed(['bytes32'],[b85decode(data['informacoesPix']['txId'])])
|
pixTimestamp = encode_packed(['bytes32'],[b85decode(data['informacoesPix']['txId'])])
|
||||||
|
|||||||
Reference in New Issue
Block a user