mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-21 13:34:18 +00:00
Don't refill on checkout if credit card payments are disabled
This commit is contained in:
parent
3f6b208ba1
commit
13243521a5
1 changed files with 2 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue