@@ -8,7 +8,7 @@ class OpenPAYGOTokenDecoder(object):
88 MAX_UNUSED_OLDER_TOKENS = 8 * 2
99
1010 @classmethod
11- def decode_token (cls , token , secret_key , last_count , used_counts = None , starting_code = None , value_divider = 1 , restricted_digit_set = False ):
11+ def decode_token (cls , token , secret_key , count , used_counts = None , starting_code = None , value_divider = 1 , restricted_digit_set = False ):
1212 secret_key = OpenPAYGOTokenShared .load_secret_key_from_hex (secret_key )
1313 if not starting_code :
1414 # We generate the starting code from the key if not provided
@@ -28,9 +28,9 @@ def decode_token(cls, token, secret_key, last_count, used_counts=None, starting_
2828 else :
2929 raise ValueError ("Token is too long" )
3030 if not extended_token :
31- value , token_type , count , updated_counts = cls .get_activation_value_count_and_type_from_token (token , starting_code , secret_key , last_count , restricted_digit_set , used_counts )
31+ value , token_type , count , updated_counts = cls .get_activation_value_count_and_type_from_token (token , starting_code , secret_key , count , restricted_digit_set , used_counts )
3232 else :
33- value , token_type , count , updated_counts = cls .get_activation_value_count_from_extended_token (token , starting_code , secret_key , last_count , restricted_digit_set , used_counts )
33+ value , token_type , count , updated_counts = cls .get_activation_value_count_from_extended_token (token , starting_code , secret_key , count , restricted_digit_set , used_counts )
3434 if value and value_divider :
3535 value = value / value_divider
3636 return value , token_type , count , updated_counts
0 commit comments