diff --git a/mpesa/services.py b/mpesa/services.py index 6b04f1d..e0f755c 100644 --- a/mpesa/services.py +++ b/mpesa/services.py @@ -62,7 +62,7 @@ def get_access_token(self): def _generate_password(self, timestamp): string = self.shortcode + self.passphrase + timestamp - return bytes(string, 'utf-8') + return string.decode('utf-8') def process_request(self, phone_number=None, amount=None, callback_url=None, reference="", description=""):