During implementation of a pricing handler, I wanted the URL variable to be accessible. This change allows the flask payment required function to also pass the fn_args, fn_kwargs to the pricing handler so all variables are accessible there as well.
Here is an example of what I wanted to be able to do. I wanted to access the "val" url variable defined in the app.route() definition.
def get_price_for_url(request, val):
return val * 100
@app.route('/buy/<int:val>')
@payment.required(get_price_for_url)
def buy(val):
if val > 100
return json.dumps({"success": True})
else
return json.dumps({"success": False})
During implementation of a pricing handler, I wanted the URL variable to be accessible. This change allows the flask payment required function to also pass the fn_args, fn_kwargs to the pricing handler so all variables are accessible there as well.
Here is an example of what I wanted to be able to do. I wanted to access the "val" url variable defined in the app.route() definition.