diff --git a/worker.py b/worker.py index c4c6496..45e13f3 100644 --- a/worker.py +++ b/worker.py @@ -489,7 +489,8 @@ class ChatWorker(threading.Thread): if credit_required > 0: self.bot.send_message(self.chat.id, strings.error_not_enough_credit) # Suggest payment for missing credit value if configuration allows refill - if configloader.config["Appearance"]["refill_on_checkout"] == 'yes': + if configloader.config["Credit Card"]["credit_card_token"] != "" \ + and configloader.config["Appearance"]["refill_on_checkout"] == 'yes': self.__make_payment(utils.Price(credit_required)) # If afer requested payment credit is still insufficient (either payment failure or cancel) if self.user.credit < self.__get_cart_value(cart):