Skip to content

Add Zap digital bank mandate support to PaystackCore#126

Merged
Peter-John-paystack merged 1 commit into
mainfrom
feature/Zap-on-SDK-Core
Jun 23, 2026
Merged

Add Zap digital bank mandate support to PaystackCore#126
Peter-John-paystack merged 1 commit into
mainfrom
feature/Zap-on-SDK-Core

Conversation

@Peter-John-paystack

Copy link
Copy Markdown
Collaborator

Introduce the Zap mandate API on the public Paystack surface:
initiateZapMandate(_:) initiates a mandate and listenForZapResponse(onChannel:)
subscribes for status updates (reusing the Pay-with-Transfer Pusher response shape).

  • ZapMandateService posts to bank/digitalbankmandate/{id}/{transactionId}, overriding baseURL to https://standard.paystack.co
  • Make baseURL an overridable PaystackService requirement (defaults to api.paystack.co) so services can target a non-default host
  • Add postForm/setFormBody for application/x-www-form-urlencoded bodies with percent-encoded fields
  • Add ZapMandateRequest/ZapMandateResponse and SupportedBank models
  • Decode supported_banks from the verify-access-code response

Tests: Zap initiate/listen, form-body encoding, and supported-banks decoding.

  Introduce the Zap mandate API on the public `Paystack` surface:
  `initiateZapMandate(_:)` initiates a mandate and `listenForZapResponse(onChannel:)`
  subscribes for status updates (reusing the Pay-with-Transfer Pusher response shape).

  - ZapMandateService posts to `bank/digitalbankmandate/{id}/{transactionId}`,
    overriding `baseURL` to `https://standard.paystack.co`
  - Make `baseURL` an overridable PaystackService requirement (defaults to
    api.paystack.co) so services can target a non-default host
  - Add `postForm`/`setFormBody` for application/x-www-form-urlencoded bodies
    with percent-encoded fields
  - Add ZapMandateRequest/ZapMandateResponse and SupportedBank models
  - Decode `supported_banks` from the verify-access-code response

  Tests: Zap initiate/listen, form-body encoding, and supported-banks decoding.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@Peter-John-paystack Peter-John-paystack marked this pull request as ready for review June 23, 2026 07:33
@Peter-John-paystack Peter-John-paystack merged commit 6299bfc into main Jun 23, 2026
4 of 6 checks passed
@Peter-John-paystack Peter-John-paystack deleted the feature/Zap-on-SDK-Core branch June 23, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants