import hashlib
import string
import random

class PaytmMock:
    @staticmethod
    def generate_checksum(param_dict, merchant_key):
        """
        Generates a dummy checksum based on the param string.
        In a real scenario, this would use the Paytm checksum library.
        """
        # Create a simple hash of the values to act as a checksum
        sorted_params = sorted(param_dict.items())
        param_string = "|".join([str(value) for key, value in sorted_params])
        salt = ''.join(random.choices(string.ascii_letters + string.digits, k=4))
        final_string = f"{param_string}|{salt}|{merchant_key}"
        
        return hashlib.sha256(final_string.encode()).hexdigest()

    @staticmethod
    def verify_checksum(param_dict, merchant_key, checksum):
        """
        Verifies the checksum.
        For this mock, we will just return True if the checksum is present.
        Real verification is complex and not needed for this mock.
        """
        if not checksum:
            return False
        return True
