mTLS
This commit is contained in:
parent
2acc72f2db
commit
ae01e72776
@ -2,9 +2,7 @@
|
||||
|
||||
## Variáveis de ambiente necessárias no arquivo `.env`:
|
||||
|
||||
- `BB_CLIENT_ID`,
|
||||
`BB_CLIENT_SECRET`, e
|
||||
`DEV_APP_KEY`: Fornecidas pelo Bando do Brasil
|
||||
- `BB_CLIENT_ID`, `BB_CLIENT_SECRET`, e `DEV_APP_KEY`: Fornecidas pelo Banco do Brasil
|
||||
|
||||
- `PRIVATE_KEY`:
|
||||
Chave privada Ethereum (em formato hexadecimal com prefixo '0x')
|
||||
|
10
bbpay.py
10
bbpay.py
@ -35,13 +35,14 @@ class BBPay(Resource):
|
||||
self.oauth.fetch_token(
|
||||
token_url='https://oauth.hm.bb.com.br/oauth/token',
|
||||
client_id=getenv("CLIENT_ID"),
|
||||
client_secret=getenv("CLIENT_SECRET"), scope=scope)
|
||||
client_secret=getenv("CLIENT_SECRET"), scope=scope,
|
||||
cert='cert.pem')
|
||||
|
||||
# Url de homologação com autenticação mTLS.
|
||||
#self.baseUrl = "https://api-bbpay.hm.bb.com.br/checkout/v2"
|
||||
self.baseUrl = "https://api-bbpay.hm.bb.com.br/checkout/v2"
|
||||
|
||||
# Url de homologação sem autenticação mTLS.
|
||||
self.baseUrl = "https://api.extranet.hm.bb.com.br/checkout/v2"
|
||||
#self.baseUrl = "https://api.extranet.hm.bb.com.br/checkout/v2"
|
||||
|
||||
# Url de produção com autenticação mTLS.
|
||||
#self.baseUrl = "https://api-bbpay.bb.com.br/checkout/v2"
|
||||
@ -70,7 +71,8 @@ class Register(BBPay):
|
||||
self.baseUrl+"/participantes",
|
||||
params=self.params,
|
||||
json=body,
|
||||
verify=self.verify_ssl)
|
||||
verify=self.verify_ssl,
|
||||
cert='cert.pem')
|
||||
return response.json()
|
||||
|
||||
class Request(BBPay):
|
||||
|
Loading…
x
Reference in New Issue
Block a user