Conversation
…osPay, PayPlus, PayDunya) and currencies (UGX, TZS, KES, RWF, ZMW, MWK, BIF, ETB, BWP, ZWL)
…ials signature with all implementations, add TransactionStatusResponse import
… add pydantic, phonenumbers, etc.)
… TransactionStatus.PENDING enum instead of raw string
…ting to abstract super, causing crash); remove debug print
…lidate_credentials private, all() misuse, sync/async mix, response.status_code, cancel_transaction nonsense return, missing abstract methods
… ProviderConfig, TransactionDetail signature, HTTPResponse.data, all abstract methods implemented
…Dunya; fix KKIA_PAY -> KKIAPAY enum value
…h self.get_client), replace status_code -> status, fix validate_webhook raises -> return False, fix transaction_type class -> enum instance
…erationError; accept **kwargs in base EasySwitchError and add provider param to UnsupportedOperationError
… hasattr/json branch), fix status .value -> enum in airtel
… AuthenticationError (consistent with BaseAdapter contract)
…otConfig/ProviderConfig from conf/base.py)
… repr (deterministic), fix phone number double-zero prefix handling
…timize sanitize_logs precompute; exceptions.py - ValidationError code not hardcoded; base.py - activate MAX_AMOUNT validation
…a (uppercase provider keys, default_currency, _X_ prefix fix), fix client.py add_source kwargs, fix test_client.py assertions and remove await on sync methods
…ontext=None, fix paystack tests for new validate_webhook signature and response.data
…ttern, webhook payload fields; fix cinetpay parse_webhook missing status; fix phone cleanup
…ent, fix webhook/status fields, ValidationError instead of ValueError)
… PayGate, Airtel Money, MTN, Bizao sections
…add provider feature matrix; rewrite home page with provider ecosystem grid; update mkdocs.yml navigation
…y/semoa/bizao guides, fix paygate guide, update api-reference with correct enums/signatures, fix fedapay asyncio example, update contributing guide
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.
Description
This PR addresses the major gaps identified in the EasySwitch SDK codebase — from critical runtime bugs to incomplete provider implementations and outdated documentation. 38 commits, 46 tests passing.
Critical Fixes (Phase 1)
all()misuse (passed multiple args instead of iterable), private_validate_credentials(abstract method not implemented), sync/async mismatch, missing@register()decorator,cancel_transactionreturningsuper().send_payment()nonsenseConfigclass, incompatiblesend_paymentsignature (kwargs instead ofTransactionDetail), treatingHTTPResponseobjects as raw dicts, no registry registrationvalidate_webhook: Signature was incompatible withBaseAdapter(acceptedraw_body: bytesinstead ofpayload: Dict)validate_webhook/parse_webhookwere delegating to abstractsuper()— guaranteedTypeErrorat runtimeadapters/interfaces.py— all 0-byte files replaced with proper implementations or removedStandardisation (Phase 2)
async with self.get_client() as client:consistentlyresponse.status_code→response.statusthroughout (PayGate, Semoa)validate_webhookimplementations returnbool(not raiseAuthenticationError)**kwargstoEasySwitchErrorbase soUnsupportedOperationError(provider=...)works everywhereHTTPResponse.dataaccess (removed deadhasattr(response, "json")branches)Core Infrastructure (Phase 3)
Configdataclass (was unused, replaced by PydanticRootConfig)EnvConfigSource— lowercase provider keys and double-underscore_X_prefix causing config validation failuresMAX_AMOUNTvalidation inBaseAdapter.validate_transactionvalidate_webhook_signaturein validators (usedrepr()instead ofjson.dumps()— non-deterministic)00228...)RateLimitErrorpassing unsupportedheaders=kwargenvironment/timeoutback toRootConfigas top-level globalsTests (Phase 4)
get_client()with async context managersProvider/TransactionStatusenums instead of raw stringsRootConfigschema (uppercase provider keys, no extra fields)asyncio.run()conflict in async test contextDocumentation (Phase 5)
# Under development)asyncio.run()inline — bad practice)mkdocs.ymlnavigation with all providers.env.samplewith all providers and fixedEVIRONMENTtypos