bug fix with handling of payments/subscriptions

legacy
Steve L. Nyemba 4 years ago
parent c1bf7abe42
commit aa3eacd8ac

@ -72,7 +72,7 @@ def get_plans_json(id):
"""
This function returns the plans for a given product
"""
HEADER="Content-type:application/json"
HEADER={"Content-type":"application/json"}
try:
mystore = store.factory.instance(name=id)
return json.dumps(mystore.get.plans()),HEADER
@ -163,6 +163,7 @@ def me ():
# mystore = store.factory.instance(name = session['product']['name'])
# mystore.init(email=session['auth']['user']['uid'])
try:
if 'auth' in session and 'product' in session :
email = session['auth']['user']['uid']
name = session['product']['name']
@ -174,8 +175,10 @@ def me ():
_args = {'context':CONTEXT,"user":session['auth']['user'],"product":session['product'],"plan":session['plan'],"payments":payments,"cards":cards}
return render_template('me.html',**_args)
except Exception as e:
print (e)
pass
return redirect("https://the-phi.com")
return render_template("none.html",context=CONTEXT)
# return redirect("http://healthcareio.the-phi.com")
@app.route("/me/card",methods=['POST'])
def me_card ():
if 'auth' in session :
@ -378,9 +381,12 @@ def init(product):
#
#@TODO: Log that uid, has initiated use of product
#
return json.dumps(features),200
HEADERS ={"content-type":"application/json"}
return features,HEADERS
@app.route("/<id>/init",methods=['POST','PUT'])
def _init(id):
return init(id)
# @app.route('/subscribe/<product>',methods=['POST'])
# def subscribe(product):
# """

Loading…
Cancel
Save