Skip to content

Add Capitec Pay and QR (Scan to Pay) charge flows - #132

Draft
peter-paystack wants to merge 4 commits into
mainfrom
feature/Capitec-and-Scan-to-Pay
Draft

Add Capitec Pay and QR (Scan to Pay) charge flows#132
peter-paystack wants to merge 4 commits into
mainfrom
feature/Capitec-and-Scan-to-Pay

Conversation

@peter-paystack

Copy link
Copy Markdown
Collaborator

Introduce two new payment methods end to end, following the existing
Views/Viewmodels/Models/Repository layout under PaystackUI/Charge.

Core (PaystackSDK):

  • CapitecPay: authenticate endpoint via CapitecPayService, with CapitecPayAuthenticateRequest/Response models
  • QR: generate endpoint via QRService, with QRGenerateRequest/Response models
  • Add Capitec/QR cases to Channel

UI (PaystackUI):

  • Capitec Pay flow: identifier entry, awaiting-approval, info banner, view model, repository, and South African ID/phone validators
  • QR flow: display view, variant handling, view model, repository, and QRChannelDirectory
  • Wire both into ChargeView/ChargeViewModel, channel selection, and supported-channel/payment-type models
  • Add reusable CopiedToast component

Tests:

  • API, repository, view model, and validator coverage for both flows, plus QRChannelDirectory and updated Charge view model/repository tests

  Introduce two new payment methods end to end, following the existing
  Views/Viewmodels/Models/Repository layout under PaystackUI/Charge.

  Core (PaystackSDK):
  - CapitecPay: authenticate endpoint via CapitecPayService, with
    CapitecPayAuthenticateRequest/Response models
  - QR: generate endpoint via QRService, with QRGenerateRequest/Response
    models
  - Add Capitec/QR cases to Channel

  UI (PaystackUI):
  - Capitec Pay flow: identifier entry, awaiting-approval, info banner,
    view model, repository, and South African ID/phone validators
  - QR flow: display view, variant handling, view model, repository, and
    QRChannelDirectory
  - Wire both into ChargeView/ChargeViewModel, channel selection, and
    supported-channel/payment-type models
  - Add reusable CopiedToast component

  Tests:
  - API, repository, view model, and validator coverage for both flows,
    plus QRChannelDirectory and updated Charge view model/repository tests
@peter-paystack peter-paystack self-assigned this Jul 23, 2026
@peter-paystack peter-paystack added the enhancement New feature or request label Jul 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
B Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

  - Add CapitecResponse/CapitecResponseData and ChargeCapitecTransaction so
    requery no longer reuses the card ChargeResponse shape
  - Change postRequery from POST with an empty body to a GET
  - Restore OAEP encryption for Capitec client data and drop the unused
    PKCS#1 helper from Cryptography
  - Use the real device fingerprint instead of the hardcoded test value
  - Set QR generate source to "checkout" and bump bindings version to 2.1.0
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.

1 participant