Compare commits
2 Commits
0cfb371051
...
925002c572
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
925002c572 | ||
|
|
e05f46a987 |
6
bbpay.py
6
bbpay.py
@@ -15,6 +15,9 @@ from eth_utils import to_wei
|
|||||||
|
|
||||||
# Load environment variables from .env file
|
# Load environment variables from .env file
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
ENVIRONMENT = getenv('ENVIRONMENT', 'dev')
|
||||||
|
dotenv_path = f'.env.{ENVIRONMENT}'
|
||||||
|
load_dotenv(dotenv_path)
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
CORS(app, origins=['https://p2pix.co'])
|
CORS(app, origins=['https://p2pix.co'])
|
||||||
@@ -52,6 +55,7 @@ class BBPay(Resource):
|
|||||||
class Register(BBPay):
|
class Register(BBPay):
|
||||||
def post(self):
|
def post(self):
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
app.logger.debug(data)
|
||||||
body = {
|
body = {
|
||||||
'numeroConvenio': getenv("BBPAY_CONVENIO"),
|
'numeroConvenio': getenv("BBPAY_CONVENIO"),
|
||||||
'nomeParticipante': data['chainID'],
|
'nomeParticipante': data['chainID'],
|
||||||
@@ -77,6 +81,7 @@ class Register(BBPay):
|
|||||||
class Request(BBPay):
|
class Request(BBPay):
|
||||||
def post(self):
|
def post(self):
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
app.logger.debug(data)
|
||||||
body = {
|
body = {
|
||||||
"geral": {
|
"geral": {
|
||||||
"numeroConvenio": getenv("BBPAY_CONVENIO"),
|
"numeroConvenio": getenv("BBPAY_CONVENIO"),
|
||||||
@@ -112,6 +117,7 @@ class Request(BBPay):
|
|||||||
|
|
||||||
class Release(BBPay):
|
class Release(BBPay):
|
||||||
def get(self, numeroSolicitacao):
|
def get(self, numeroSolicitacao):
|
||||||
|
app.logger.debug(request.get_json())
|
||||||
response = self.oauth.get(
|
response = self.oauth.get(
|
||||||
self.baseUrl+f"/solicitacoes/{numeroSolicitacao}",
|
self.baseUrl+f"/solicitacoes/{numeroSolicitacao}",
|
||||||
params=self.params,
|
params=self.params,
|
||||||
|
|||||||
Reference in New Issue
Block a user