feat: add card transactions and automated release tagging#9
Merged
Conversation
IMonnifyCardsClient covers direct card charges as an alternative to hosted checkout: ChargeAsync, AuthorizeOtpAsync, and the PCI DSS-gated Authorize3dsAsync. Registered with automatic retry disabled, same reasoning as Disbursements/Bills - ChargeAsync directly debits a card, so an ambiguous failure must be resolved via GetTransactionAsync rather than retried. Sandbox-tested with our documented test cards: the request shape is handled correctly (the dedicated "Failed Card" number gets its own distinct error), but the no-OTP/OTP/3DS cards all returned "Card bin not found" instead of completing a charge - reads as a sandbox account configuration gap rather than a request-format issue. See docs/COMPATIBILITY.md for details; AuthorizeOtpAsync's response shape and ChargeCardResult.TokenId remain unverified against a real OTP-required response as a result.
Re-verified InitiateBankTransferAsync against a fresh sandbox call while cross-checking a newly pasted doc sample. The existing model was already right (ussdPayment, not the ussdCode our simplified doc sample shows) - this only updates docs/COMPATIBILITY.md with the verified field list and flags an unmodeled, always-null productInformation field.
Card charging completes a transaction started by InitializeTransactionAsync, the same way InitiateBankTransferAsync does - moved ChargeAsync, AuthorizeOtpAsync, and Authorize3dsAsync (plus their models) onto IMonnifyCollectionsClient instead of a separate IMonnifyCardsClient, under Collections/Models/Transactions. The whole Collections client now registers with automatic retry disabled, since ChargeAsync directly debits a card - more conservative than its other (non-money-moving) methods strictly need, traded for keeping every collection method on one client. Also corrected the bank-transfer doc note found while cross-referencing this: the real ussdPayment response field, not ussdCode as our simplified doc sample shows - the SDK already had this right.
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.
Two unrelated changes bundled in this branch:
Automated releases. Added
release-please(.github/workflows/release-please.yml,release-please-config.json,.release-please-manifest.json) so version numbers and release tags are decided automatically from Conventional Commits on every merge tomain, instead of tagging by hand likev0.1.0was. Future releases just need afeat:/fix:commit merged, then approving the resulting Release PR.Card transactions. Added support for charging a card directly (raw PAN/CVV/PIN) as an alternative to hosted checkout:
ChargeAsync,AuthorizeOtpAsync(OTP-required cards), andAuthorize3dsAsync(PCI DSS-gated, requires separate Monnify activation). These live onIMonnifyCollectionsClientrather than a separate client, since card charging completes a transaction fromInitializeTransactionAsyncthe same wayInitiateBankTransferAsyncdoes. As a result, the wholeIMonnifyCollectionsClientnow registers with automatic retry disabled (sinceChargeAsyncdirectly debits a card) - more conservative than its other methods strictly need, traded for keeping every collection method on one client.Sandbox-tested with Monnify's documented test cards: the request format is handled correctly (the dedicated "Failed Card" number returns its own distinct error), but the no-OTP/OTP/3DS cards all returned
"Card bin not found. Please contact support."instead of completing a charge - reads as a sandbox account configuration gap rather than a request-format issue. Seedocs/COMPATIBILITY.mdfor details;AuthorizeOtpAsync's real response shape andChargeCardResult.TokenIdremain unverified as a result.Also includes a docs-only fix found while cross-referencing a Monnify doc page for
InitiateBankTransferAsync: their sample shows the USSD field asussdCode, but a real sandbox call confirmed it'sussdPayment, which the SDK already had right.Checklist
dotnet test)dotnet format --verify-no-changespassesCHANGELOG.mdupdated under[Unreleased]docs/COMPATIBILITY.mdupdated for any endpoint you implemented or changed