else: for i in a4["install"]: s = db.download(a1["userid"], apps[i]) if not s: puts( colored.red( "{} is a paid app, you have to pay to download it". format(i))) a6 = prompt(q6, style=style) pays = {} if a6["buy"]: for j in ("debitcard", "creditcard", "ewallet", "netbanking"): q7[0]["choices"].append( Separator("= {} =".format(j))) payments = db.get_payment(a1["userid"], j, False) payments = dict(payments) for k in payments.keys(): q7[0]["choices"].append({"name": k}) pays.update(dict(payments)) a7 = prompt(q7, style=style) s = db.download(a1["userid"], apps[i], pays.get(a7["payment"])) if s: puts( colored.green( "{} downloaded successfully.".format(i))) else: puts( colored.red( "download of {} failed. may be because your card has been expired"