Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed calculation error in mpesa_acces_token function #5

Merged
merged 2 commits into from
Jan 3, 2023

Conversation

bedah-kym
Copy link
Contributor

hi am a junior Django dev working on an e-commerce site and this bug really messed my tokens id love to get a response if the fix works for you

the mpesa_access_token() had a bug in my system where the OAuth token would not refresh unless the request was sent 51 minutes after it expired. Now if no one used the system for  an hour ,the token minutes would count to 59 then go back to zero since the minutes code would calculate the minutes above the hour  making the old token "valid" since the minutes would be less than 50. I removed the modulus calculation so the minutes always go above 60.
removed the calculation error in mpesa_access_token()
@martinmogusu
Copy link
Owner

Thanks for the catch!!!

@martinmogusu martinmogusu merged commit bed799a into martinmogusu:master Jan 3, 2023
@bedah-kym
Copy link
Contributor Author

bedah-kym commented Jan 9, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants