def credit_choices(settings=None, include_module_if_no_choices=False):
    choices = []
    keys = []
    for module, group in active_gateways():
        vals = config_choice_values(group, 'CREDITCHOICES')
        for key, label in vals:
            if not key in keys:
                keys.append(key)
                pair = (key, ugettext(label))
                choices.append(pair)
        if include_module_if_no_choices and not vals:
            key = config_value(group, 'KEY')
            label = config_value(group, 'LABEL')
            pair = (key, ugettext(label))
            choices.append(pair)
    return choices
dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/payment/config.py/credit_choices/original