Skip to content

feat(BTI-23): add eMandate solution (B2C + B2B)#15

Merged
vildanbina merged 1 commit into
developfrom
BTI-23-emandate-solution
Jul 14, 2026
Merged

feat(BTI-23): add eMandate solution (B2C + B2B)#15
vildanbina merged 1 commit into
developfrom
BTI-23-emandate-solution

Conversation

@vildanbina

@vildanbina vildanbina commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

What

Adds eMandate as a DataRequest-based solution (reached via app.solutions), matching the shape of the PHP and Node SDKs. Covers both service codes — emandate (B2C) and emandateb2b (B2B) — and all five actions.

How

  • EmandateBuilder extends SolutionBuilder; EmandateB2BBuilder subclass overrides only the service name (emandateb2b). Both registered in SolutionMethodFactory.
  • Per-action required/allowed service-parameter validation via get_allowed_service_parameters, enforced by the existing ServiceParameterValidator before the request hits the wire.
  • Reuses PaymentResponse — no bespoke per-action response model (same convention as iDIN / PHP / Node).
  • examples/emandate.py (env-gated, B2C + B2B, all five actions) and a README ### eMandate section.

Tests

  • Unit + feature tests for every action (success + missing-required-param validation), plus B2B service-name and factory-resolution tests.
  • Full suite: 2359 passed, ruff clean.

Live verification (Buckaroo Plaza, test mode)

  • GetIssuerList190 success (B2C + B2B).
  • CreateMandate791 pending + redirect URL (B2C + B2B) — correct; the consumer approves at their bank.
  • GetStatus / ModifyMandate / CancelMandate were exercised against a placeholder mandate id and returned expected gateway rejections (the real mandate id only exists after the bank redirect completes). Happy paths for those three are not yet verified end-to-end.

Notes

  • Decisions: currency kept optional (eMandate has no amount); reference-SDK param names used (debtorReference, mandateId, …).
  • Out of scope: SEPA PayWithEmandate (collecting against a mandate), async push handling.

Jira: BTI-23 (epic BTI-552).

Add eMandate as a DataRequest-based solution with five actions:
GetIssuerList, CreateMandate, GetStatus, ModifyMandate, CancelMandate.

- EmandateBuilder (SolutionBuilder) + EmandateB2BBuilder subclass for the
  emandateb2b service code; both registered in SolutionMethodFactory.
- Per-action allowed/required service-parameter validation
  (debtorReference for create; mandateId for status/modify/cancel).
- Reuses PaymentResponse; no bespoke per-action response model.
- Unit + feature tests for every action (success + validation paths),
  runnable examples/emandate.py, and a README eMandate section.

Verified against Buckaroo Plaza test: GetIssuerList succeeds and
CreateMandate is accepted (redirect returned) for both B2C and B2B.
@vildanbina vildanbina merged commit ef1f026 into develop Jul 14, 2026
6 checks passed
@vildanbina vildanbina deleted the BTI-23-emandate-solution branch July 14, 2026 13:27
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.

2 participants