The documentation indicates that we can receive a post of market payment in Python this function:
def index(req, **kwargs):
mp = mercadopago.MP(CLIENT_ID, ACCESS_TOKEN)
paymentInfo = mp.get_payment_info(kwargs["id"])
if paymentInfo["status"] == 200:
return paymentInfo["response"]
else:
return None
How should I use marketpay methods in Flask?
@app.route("/", methods=['GET', 'POST'])
def index(req, **kwargs):
mp = mercadopago.MP(CLIENT_ID, ACCESS_TOKEN)
paymentInfo = mp.get_payment_info(kwargs["id"])
if paymentInfo["status"] == 200:
return paymentInfo["response"]
else:
return None