Skip to content

feat: Add public API layer (scope protocols, state types)#1635

Open
bthebladeprimer wants to merge 2 commits into
bn/feature/cc-05-validationfrom
bn/feature/cc-06-public-api
Open

feat: Add public API layer (scope protocols, state types)#1635
bthebladeprimer wants to merge 2 commits into
bn/feature/cc-05-validationfrom
bn/feature/cc-06-public-api

Conversation

@bthebladeprimer
Copy link
Copy Markdown
Contributor

Summary

  • Adds scope protocols defining the public API surface for each payment method (card form, Apple Pay, ACH, Klarna, PayPal, QR code, web redirect, form redirect)
  • Adds PrimerCheckoutScope as the top-level entry point for CheckoutComponents
  • Adds PrimerCardFormState and PrimerApplePayState observable state types
  • Adds provider protocols (CardFormProvider, PaymentMethodSelectionProvider, SelectCountryProvider) for SwiftUI integration
  • Adds InputFieldConfig, PrimerFieldStyling, PrimerCheckoutTheme, and PrimerEnvironment for UI configuration
  • Includes mock interactors and 6 test files covering scope implementations and state management

Context

PR 6 of 15 in the CheckoutComponents feature split. Defines the merchant-facing API that SwiftUI views bind to. Depends on PR 5 (#1634).

Tracker: https://www.notion.so/32fca65dc30e81dabf66f33e2b58c3a1

Test plan

  • Verify scope tests pass (DefaultCardFormScopeTests, PrimerCardFormScopeTests, PrimerPaymentMethodScopeTests, DefaultSelectCountryScopeTests)
  • Verify state tests pass (PrimerCardFormStateTests, PrimerApplePayStateTests)
  • Confirm mock interactors work correctly in test context
  • Run: xcodebuild -workspace PrimerSDK.xcworkspace -scheme PrimerSDKTests -destination "platform=iOS Simulator,name=iPhone 16" test

@bthebladeprimer bthebladeprimer requested a review from a team as a code owner March 26, 2026 15:40
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 26, 2026

Warnings
⚠️ > Pull Request size seems relatively large. If this Pull Request contains multiple changes, please split each into separate PR will helps faster, easier review.

Generated by 🚫 Danger Swift against 6cd9137

@bthebladeprimer bthebladeprimer self-assigned this Mar 26, 2026
@bthebladeprimer bthebladeprimer marked this pull request as draft March 26, 2026 16:32
@bthebladeprimer bthebladeprimer force-pushed the bn/feature/cc-05-validation branch from 70b5a50 to efa6da3 Compare March 31, 2026 14:06
@bthebladeprimer bthebladeprimer force-pushed the bn/feature/cc-06-public-api branch from b106d79 to 8940f4a Compare March 31, 2026 14:06
@bthebladeprimer bthebladeprimer marked this pull request as ready for review April 3, 2026 18:09
@bthebladeprimer bthebladeprimer force-pushed the bn/feature/cc-05-validation branch from 3220d09 to bb4a39d Compare April 15, 2026 13:01
@bthebladeprimer bthebladeprimer requested a review from a team as a code owner April 15, 2026 13:01
@bthebladeprimer bthebladeprimer force-pushed the bn/feature/cc-06-public-api branch from 3bf8f05 to 6cd9137 Compare April 15, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant