Skip to content

Commit

Permalink
Change /v1/add to JSON POST
Browse files Browse the repository at this point in the history
  • Loading branch information
freQniK committed Nov 3, 2023
1 parent 3f8caef commit 902cdf7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions meile_plan_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,14 @@ def add_wallet_to_plan():
status = False
renewal = False
try:
wallet = request.json.get('wallet')
plan_id = int(request.json.get('planid')) # plan ID, we should have 4 or 5 plans. Will be a UUID.
duration = int(request.json.get('duration')) # duration of plan subscription, in months
sub_id = int(request.json.get('subid')) # subscription ID of plan
uuid = request.json.get('uuid') # uuid of subscription
amt_paid = int(request.json.get('amt'))
denom = int(request.json.get('denom'))
JSON = request.json
wallet = JSON['data']['wallet']
plan_id = int(JSON['data']['planid']) # plan ID, we should have 4 or 5 plans. Will be a UUID.
duration = int(JSON['data']['duration']) # duration of plan subscription, in months
sub_id = int(JSON['data']['subid']) # subscription ID of plan
uuid = JSON['data']['uuid'] # uuid of subscription
amt_paid = int(JSON['data']['amt'])
denom = int(JSON['data']['denom'])
except Exception as e:
print(str(e))
status = False
Expand Down

0 comments on commit 902cdf7

Please sign in to comment.