dynamic deploy environments
This commit is contained in:
parent
68f33a3249
commit
60a22e1b0b
16
.env.example
Normal file
16
.env.example
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
PRIVATE_KEY=0x....
|
||||||
|
CLIENT_ID=
|
||||||
|
CLIENT_SECRET=
|
||||||
|
DEV_APP_KEY=
|
||||||
|
DEBUG=false
|
||||||
|
ITP_TOKEN_URL = https://oauth.hm.bb.com.br/oauth/token
|
||||||
|
# Url de produção com autenticação mTLS.
|
||||||
|
#ITP_API_URL="https://api-bbpay.bb.com.br/checkout/v2"
|
||||||
|
# Url de homologação com autenticação mTLS.
|
||||||
|
ITP_API_URL = "https://api-bbpay.hm.bb.com.br/checkout/v2"
|
||||||
|
# Url de homologação sem autenticação mTLS.
|
||||||
|
#ITP_API_URL = "https://api.extranet.hm.bb.com.br/checkout/v2"
|
||||||
|
|
||||||
|
# 05/08/2025
|
||||||
|
#ITP_API_URL=https://checkout.mtls.api.bb.com.br
|
||||||
|
#ITP_API_URL=https://checkout.mtls.api.hm.bb.com.br
|
||||||
13
bbpay.py
13
bbpay.py
@ -27,15 +27,8 @@ class BBPay(Resource):
|
|||||||
|
|
||||||
self.cert = 'key.pem'
|
self.cert = 'key.pem'
|
||||||
self.verify_ssl = 'bb.pem'
|
self.verify_ssl = 'bb.pem'
|
||||||
|
self.baseUrl = getenv("ITP_API_URL")
|
||||||
# Url de homologação com autenticação mTLS.
|
self.token_url = getenv("ITP_TOKEN_URL")
|
||||||
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"
|
|
||||||
|
|
||||||
# Url de produção com autenticação mTLS.
|
|
||||||
#self.baseUrl = "https://api-bbpay.bb.com.br/checkout/v2"
|
|
||||||
|
|
||||||
self.params = {
|
self.params = {
|
||||||
'numeroConvenio': 701,
|
'numeroConvenio': 701,
|
||||||
@ -48,7 +41,7 @@ class BBPay(Resource):
|
|||||||
'checkout.participantes-info']
|
'checkout.participantes-info']
|
||||||
|
|
||||||
self.oauth.fetch_token(
|
self.oauth.fetch_token(
|
||||||
token_url='https://oauth.hm.bb.com.br/oauth/token',
|
token_url=self.token_url,
|
||||||
client_id=getenv("CLIENT_ID"),
|
client_id=getenv("CLIENT_ID"),
|
||||||
client_secret=getenv("CLIENT_SECRET"), scope=self.scope)
|
client_secret=getenv("CLIENT_SECRET"), scope=self.scope)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user