make value_in_json=True

This commit is contained in:
ahmadbilalkhalid 2020-01-27 14:55:26 +05:00
commit 200a7672f2
4 changed files with 23 additions and 24 deletions

View file

@ -272,14 +272,14 @@ class StripeUtils(object):
all_stripe_plans = client.get("/v1/stripe_plans")
all_stripe_plans_set = set()
if all_stripe_plans:
all_stripe_plans_obj = json.loads(all_stripe_plans.value)
all_stripe_plans_obj = all_stripe_plans.value
if all_stripe_plans_obj and len(all_stripe_plans_obj['plans']) > 0:
all_stripe_plans_set = set(all_stripe_plans_obj["plans"])
return all_stripe_plans_set
@staticmethod
def _save_all_stripe_plans(stripe_plans):
client.put("/v1/stripe_plans", json.dumps({"plans": list(stripe_plans)}))
client.put("/v1/stripe_plans", {"plans": list(stripe_plans)})
@handle_stripe_error
def get_or_create_stripe_plan(self, product_name, amount, stripe_plan_id,