1.0.2 subscribe page w dynamically load
This commit is contained in:
@@ -12,8 +12,8 @@ def get_order_status(order):
|
|||||||
res_data = get_order_status(order.bank_order_id)
|
res_data = get_order_status(order.bank_order_id)
|
||||||
|
|
||||||
res = json.loads(res_data.text)
|
res = json.loads(res_data.text)
|
||||||
order.json_data['status'] = res
|
|
||||||
res = res['orders'][0]
|
res = res['orders'][0]
|
||||||
|
order.json_data['status'] = res
|
||||||
|
|
||||||
order.status = res['status']
|
order.status = res['status']
|
||||||
|
|
||||||
@@ -69,8 +69,9 @@ def create_subscribe_order(data):
|
|||||||
order.pay_page = res_data.headers.get('location')
|
order.pay_page = res_data.headers.get('location')
|
||||||
|
|
||||||
res = json.loads(res_data.text)
|
res = json.loads(res_data.text)
|
||||||
order.json_data['create_order'] = res
|
|
||||||
res = res['orders'][0]
|
res = res['orders'][0]
|
||||||
|
order.json_data['create_order'] = res
|
||||||
|
|
||||||
order.modifiedDT = datetime.strptime(res['updated'], '%Y-%m-%d %H:%M:%S')
|
order.modifiedDT = datetime.strptime(res['updated'], '%Y-%m-%d %H:%M:%S')
|
||||||
order.status = res['status']
|
order.status = res['status']
|
||||||
order.bank_order_id = res['id']
|
order.bank_order_id = res['id']
|
||||||
|
|||||||
@@ -77,7 +77,10 @@ def get_profile_subscribe_page_content_Dict(request):
|
|||||||
order = get_order_status(order)
|
order = get_order_status(order)
|
||||||
subscribes_for_user = check_n_enable_subscribe_by_order(order)
|
subscribes_for_user = check_n_enable_subscribe_by_order(order)
|
||||||
if not subscribes_for_user:
|
if not subscribes_for_user:
|
||||||
subscribes.get(id=order.subscribe.id).order_error = order.status
|
error = f'{order.status}'
|
||||||
|
if 'status' in order.json_data and 'failure_message' in order.json_data['status']:
|
||||||
|
error = f'{error} ({order.json_data["status"]["failure_message"]})'
|
||||||
|
subscribes.get(id=order.subscribe.id).order_error = error
|
||||||
check_orders_required = False
|
check_orders_required = False
|
||||||
else:
|
else:
|
||||||
check_orders_required = True
|
check_orders_required = True
|
||||||
|
|||||||
Reference in New Issue
Block a user