Skip to content

Add DisplayAudience config to tailor payment UI for merchant-facing devices - #136

Draft
peter-paystack wants to merge 2 commits into
mainfrom
feature/Add-Display-Audience
Draft

peter-paystack wants to merge 2 commits into
mainfrom
feature/Add-Display-Audience

Conversation

@peter-paystack

Copy link
Copy Markdown
Collaborator

Introduce a public DisplayAudience type (.customerFacing default,
.merchantFacing) set via PaystackBuilder.setDisplayAudience(_:) and
carried on PaystackConfig. PaystackUI injects it into the SwiftUI
environment from both chargeUIButton and presentChargeUI.

  • Add AudienceGatedElement / AudienceCopy with a .visible(for:)
    modifier and DisplayAudience.text(_:) so views gate elements and
    copy by audience, with unknown audiences falling back to customer-facing
  • Zap: show the "Open Zap" button when customer-facing and the QR code
    when merchant-facing, with matching instruction copy; replaces the
    ZapViewModel.showsOpenZapButton static flag
  • Document the new option in the README
  • Add builder and visibility tests

…evices

  Introduce a public `DisplayAudience` type (`.customerFacing` default,
  `.merchantFacing`) set via `PaystackBuilder.setDisplayAudience(_:)` and
  carried on `PaystackConfig`. PaystackUI injects it into the SwiftUI
  environment from both `chargeUIButton` and `presentChargeUI`.

  - Add `AudienceGatedElement` / `AudienceCopy` with a `.visible(for:)`
    modifier and `DisplayAudience.text(_:)` so views gate elements and
    copy by audience, with unknown audiences falling back to customer-facing
  - Zap: show the "Open Zap" button when customer-facing and the QR code
    when merchant-facing, with matching instruction copy; replaces the
    `ZapViewModel.showsOpenZapButton` static flag
  - Document the new option in the README
  - Add builder and visibility tests
  Xcode 27 only supports deployment targets from iOS 15.0 upward. Update
  the Podfile platform, the post_install override and the Xcode project
  settings. Also normalise Info.plist indentation to tabs.
@peter-paystack peter-paystack self-assigned this Oct 1, 2026
@peter-paystack peter-paystack added the enhancement New feature or request label Oct 1, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 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

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