Skip to content

Switch Zap Pusher to terminal-only response and add shared PKCS#1 enc…#131

Merged
peter-paystack merged 1 commit into
mainfrom
feature/Switch-Zap-Pusher-to-terminal-only-response
Jul 10, 2026
Merged

Switch Zap Pusher to terminal-only response and add shared PKCS#1 enc…#131
peter-paystack merged 1 commit into
mainfrom
feature/Switch-Zap-Pusher-to-terminal-only-response

Conversation

@peter-paystack

Copy link
Copy Markdown
Collaborator

…ryption

Refactor the Zap listen path to the narrow Charge3DSResponse / ChargeCardTransaction
shape shared with card 3DS and mobile money, replacing the reused
PayWithTransfer shape. The server only publishes terminal success/failed
events on the Zap channel, so the ZapViewModel loop collapses to a
single-shot await per the PusherSubscriptionListener contract.

  • Zap: listenForZapResponse now returns Service; repository maps to ChargeCardTransaction; ZapViewModel drops the re-subscribe loop.
  • Cryptography: expose public Cryptography + CryptographyProtocol with an encryptPKCS1 (RSA PKCS#1 v1.5) method mirroring Node's crypto.publicEncrypt.
  • Add EmptyRequest Encodable model for bodyless POST endpoints.
  • Add provider assets (Capitec Pay, Scan to Pay, SnapScan, SA flag) and Pusher/response fixtures (CapitecPay, QR, Zap success/failed) as groundwork for the Capitec Pay and Scan-to-Pay charge flows.
  • Tests: PKCS#1 round-trip + non-determinism coverage, Zap success/failed decode tests, and updated Zap repository/view-model/mock expectations.

…ryption

  Refactor the Zap listen path to the narrow Charge3DSResponse / ChargeCardTransaction
  shape shared with card 3DS and mobile money, replacing the reused
  PayWithTransfer shape. The server only publishes terminal success/failed
  events on the Zap channel, so the ZapViewModel loop collapses to a
  single-shot await per the PusherSubscriptionListener contract.

  - Zap: listenForZapResponse now returns Service<Charge3DSResponse>; repository
    maps to ChargeCardTransaction; ZapViewModel drops the re-subscribe loop.
  - Cryptography: expose public Cryptography + CryptographyProtocol with an
    encryptPKCS1 (RSA PKCS#1 v1.5) method mirroring Node's crypto.publicEncrypt.
  - Add EmptyRequest Encodable model for bodyless POST endpoints.
  - Add provider assets (Capitec Pay, Scan to Pay, SnapScan, SA flag) and
    Pusher/response fixtures (CapitecPay, QR, Zap success/failed) as groundwork
    for the Capitec Pay and Scan-to-Pay charge flows.
  - Tests: PKCS#1 round-trip + non-determinism coverage, Zap success/failed
    decode tests, and updated Zap repository/view-model/mock expectations.
@peter-paystack peter-paystack self-assigned this Jul 9, 2026
@peter-paystack peter-paystack requested review from a team and michael-paystack as code owners July 9, 2026 15:15
@peter-paystack peter-paystack added the enhancement New feature or request label Jul 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

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-paystack peter-paystack merged commit 797863d into main Jul 10, 2026
4 of 6 checks passed
@peter-paystack peter-paystack deleted the feature/Switch-Zap-Pusher-to-terminal-only-response branch July 10, 2026 11:57
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