Skip to content

Commit

Permalink
Update services.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Barukimang authored Apr 17, 2020
1 parent 57c6f62 commit 0257c89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mpesa/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def get_access_token(self):

def _generate_password(self, timestamp):
string = str(self.shortcode + self.passphrase + timestamp)
return base64.b64encode(string.encode('utf-8'))
b64_str = base64.b64encode(string.encode('utf-8'))
return b64_str.decode('utf-8')

def process_request(self, phone_number=None, amount=None,
callback_url=None, reference="", description=""):
Expand Down

0 comments on commit 0257c89

Please sign in to comment.