Skip to content

Revert MTN MoMo SDK to original product-separated architecture#29

Open
nutcas3 wants to merge 1 commit intomainfrom
update-momo
Open

Revert MTN MoMo SDK to original product-separated architecture#29
nutcas3 wants to merge 1 commit intomainfrom
update-momo

Conversation

@nutcas3
Copy link
Owner

@nutcas3 nutcas3 commented Jan 28, 2026

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
    fixes Bug in the momo sdk package #28
    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 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.
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.

Bug in the momo sdk package

1 participant