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

chore: move express-request and transaction reversal to builder pattern #88

Merged
merged 35 commits into from
Jan 28, 2024

Conversation

itsyaasir
Copy link
Collaborator

@itsyaasir itsyaasir commented Nov 18, 2023

Closes #20
Closes #43
Closes #24

@itsyaasir itsyaasir requested a review from c12i November 18, 2023 11:11
src/validator.rs Outdated Show resolved Hide resolved
src/validator.rs Outdated Show resolved Hide resolved
src/validator.rs Outdated Show resolved Hide resolved
tests/mpesa-rust/transaction_reversal_test.rs Outdated Show resolved Hide resolved
@itsyaasir itsyaasir requested a review from c12i November 22, 2023 13:43
Copy link
Owner

@c12i c12i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments on the amount field for the request and builder structs, as a simple workaround, we should consider switching to u32 to avoid potential validation errors. This would mean removing the #[builder(setter(into))] attribute on the amount field for the builder structs

The only floating point number accepted by Safaricom is <num>.0, so to avoid these kinds of errors, let's always send whole numbers to Safaricom

I noticed this was a problem while working on #90

src/services/transaction_reversal.rs Outdated Show resolved Hide resolved
src/services/express_request.rs Outdated Show resolved Hide resolved
src/services/express_request.rs Outdated Show resolved Hide resolved
express_request.rs and transaction_reversal.rs
@itsyaasir itsyaasir requested a review from c12i November 23, 2023 05:12
@itsyaasir
Copy link
Collaborator Author

Closes #20 #43 #24

@c12i
Copy link
Owner

c12i commented Dec 1, 2023

Hey @itsyaasir, I'm looking into the why the CI workflow is failing

@c12i
Copy link
Owner

c12i commented Dec 1, 2023

I think dotenvy is not able to retrieve the environment variables
@itsyaasir

@itsyaasir itsyaasir merged commit b313747 into master Jan 28, 2024
11 checks passed
@itsyaasir itsyaasir deleted the chore/move-express-request-tx-reversal branch January 28, 2024 13:46
@itsyaasir itsyaasir linked an issue Jan 28, 2024 that may be closed by this pull request
@c12i c12i mentioned this pull request Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants