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.
feat: implement RemitaGateway (Nigeria - government & corporate payments) #29
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
Uh oh!
There was an error while loading. Please reload this page.
feat: implement RemitaGateway (Nigeria - government & corporate payments) #29
Changes from all commits
ebcb26eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not return success when
RRRis missing.statuscode == "025"with an empty/missingRRRcurrently returnsSuccess = trueand builds an invalid checkout URL. That creates a broken transaction state.Proposed fix
var rrr = root.TryGetProperty("RRR", out var rrrProp) ? rrrProp.GetString() : string.Empty; +if (string.IsNullOrWhiteSpace(rrr)) +{ + return new PaymentResponse + { + Success = false, + Message = "Remita payment initiation failed: missing RRR", + Status = PaymentStatus.Failed + }; +} var checkoutUrl = _config.Remita.IsSandbox📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
In the official Remita reversal API contract, does therrrfield strictly require the Remita RRR value, or can it accept a merchant order/transaction reference (e.g., internalREM_*)?💡 Result:
The official Remita reversal/chargeback API contract (the “rrr” field in the Remita Retrieval Reference payment/reversal flow) expects the field value to be the Remita Retrieval Reference itself; it is not a merchant order/transaction reference such as your internal “REM_*”. The contract defines
rrras “Required” and explicitly states it is “This is the Remita Retrieval Reference”. [1] So: you should send the actual Remita Retrieval Reference (RRR) generated/associated with that payer’s transaction, not your internal orderId/transaction reference. [1]Citations:
Fix Remita refund
rrrmapping to send the actual Remita Retrieval Reference (RRR)In
PayBridge.SDK/Gateways/RemitaGateway.cs(lines 186-191), the reversal/refund payload setsrrr = request.TransactionReference. Remita’s contract definesrrras the Remita Retrieval Reference itself and marks it Required, so this value must be the provider’s RRR for that payer transaction—not an internal merchant/order/transaction reference. Persist the RRR from the payment flow and use that stored RRR when building therrrfield for refunds/reversals.🤖 Prompt for AI Agents