Revert MTN MoMo SDK to original product-separated architecture#29
Open
Revert MTN MoMo SDK to original product-separated architecture#29
Conversation
This change reverts the problematic pkg/api package structure that broke the fundamental design principles of the MTN MoMo SDK. Problem: - Introduced single-client approach with one subscription key for all products - Broke MTN MoMo's API product separation (Collection, Disbursement, Remittance) - Required users to subscribe to all products even when only using one - Violated the flexibility and transparency of the real MTN MoMo API Solution: - Removed pkg/api package entirely - Restored original momo.go implementation with product separation - Maintained flexible subscription key configuration - Preserved API structure alignment with MTN MoMo's product categories Benefits Restored: - Users only need subscription keys for products they actually use - Cost efficiency by avoiding unused product subscriptions - API transparency matching MTN MoMo's actual structure - Proper error handling for unauthorized product access Changes: - Delete: momo/pkg/ directory and all its contents - Restore: Original momo.go with ClientConfig and product-specific services - Update: README.md to reflect correct usage patterns - Verify: All tests pass and SDK functionality maintained This ensures the SDK maintains the flexibility and transparency that MTN MoMo API provides while supporting all current and future API methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change reverts the problematic pkg/api package structure that broke the fundamental design principles of the MTN MoMo SDK.
Problem:
Solution:
Benefits Restored:
fixes Bug in the
momosdk package #28Changes:
This ensures the SDK maintains the flexibility and transparency that MTN MoMo API provides while supporting all current and future API methods.