newtonmunene99 / mpesa-dart

A dart wrapper around mpesa daraja api
https://pub.dev/packages/mpesa
MIT License
21 stars 15 forks source link

Pull Request: Code Refactoring and Enhancements #6

Closed sirkev closed 1 year ago

sirkev commented 1 year ago

Description: This pull request includes several improvements and enhancements to the codebase. The changes made are as follows: Separated the timestamp and password generation into their own methods for better code organization and re-usability.

  1. Included input validation to ensure that the required parameters are provided and have valid values. This will help prevent runtime errors and improve overall reliability.
  2. Added more detailed error handling for the HTTP requests to handle different scenarios and provide meaningful error messages.
  3. Separated the response logic into a separate file for better separation of concerns and improved code organization.
  4. Fixed some typos and improved code readability.
  5. Added unit tests to ensure the correctness and reliability of the implemented functionality.
  6. Organized the file structure to improve maintainability and readability.

These changes aim to enhance the overall quality, reliability, and maintainability of the codebase. Please review and merge this pull request.

side note :as this PR introduces no new features, there was no need to create a new branch, subsequent updates will be on separate branches before merging to master

Testing: Ran all the tests locally and verified that they pass. Manually tested the code with different scenarios to ensure its correctness and reliability. @newtonmunene99 Please review. Thank you!

newtonmunene99 commented 1 year ago

Thank you Kevin,

I will review and merge

On Sat, 1 Jul 2023, 1:13 pm Kevin oduor, @.***> wrote:

Description: This pull request includes several improvements and enhancements to the codebase. The changes made are as follows: Separated the timestamp and password generation into their own methods for better code organization and re-usability.

  1. Included input validation to ensure that the required parameters are provided and have valid values. This will help prevent runtime errors and improve overall reliability.
  2. Added more detailed error handling for the HTTP requests to handle different scenarios and provide meaningful error messages.
  3. Separated the response logic into a separate file for better separation of concerns and improved code organization.
  4. Fixed some typos and improved code readability.
  5. Added unit tests to ensure the correctness and reliability of the implemented functionality.
  6. Organized the file structure to improve maintainability and readability.

These changes aim to enhance the overall quality, reliability, and maintainability of the codebase. Please review and merge this pull request.

side note :as this PR introduces no new features, there was no need to create a new branch, subsequent updates will be on separate branches before merging to master

Testing: Ran all the tests locally and verified that they pass. Manually tested the code with different scenarios to ensure its correctness and reliability. @newtonmunene99 https://github.com/newtonmunene99 Please review. Thank you!

You can view, comment on, or merge this pull request online at:

https://github.com/newtonmunene99/mpesa-dart/pull/6 Commit Summary

File Changes

(16 files https://github.com/newtonmunene99/mpesa-dart/pull/6/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/newtonmunene99/mpesa-dart/pull/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7KKJIJVX6GFSCJEN6LDRLXN7Z5RANCNFSM6AAAAAAZ2WUT7E . You are receiving this because you were mentioned.Message ID: @.***>