PrimerFormRedirectScope manages payment methods that collect user input (OTP code or phone number) before completing payment in an external app (e.g., BLIK, MBWay).
Declaration
Properties
| Property | Type | Description |
|---|---|---|
paymentMethodType | String | Payment method type identifier (e.g., "ADYEN_BLIK") |
state | AsyncStream<PrimerFormRedirectState> | Stream of form redirect state changes |
Customization
| Property | Type | Description |
|---|---|---|
screen | FormRedirectScreenComponent? | Full screen replacement (replaces both form and pending screens). Signature: (any PrimerFormRedirectScope) -> any View |
formSection | FormRedirectFormSectionComponent? | Custom form fields area. Signature: (any PrimerFormRedirectScope) -> any View |
submitButton | FormRedirectButtonComponent? | Custom submit button. Signature: (any PrimerFormRedirectScope) -> any View |
submitButtonText | String? | Submit button label (default: payment method specific) |
Methods
| Method | Description |
|---|---|
updateField(_:value:) | Update a form field value by field type |
This scope inherits
start(), submit(), cancel(), onBack(), presentationContext, and dismissalMechanism from PrimerPaymentMethodScope.PrimerFormRedirectState
Flow
| Property | Type | Description |
|---|---|---|
status | Status | Current payment status |
fields | [PrimerFormFieldState] | Form fields for user input |
isSubmitEnabled | Bool | Whether all fields are valid (computed) |
pendingMessage | String? | Message while awaiting external completion |
surchargeAmount | String? | Formatted surcharge amount |
otpField | PrimerFormFieldState? | Convenience accessor for OTP field |
phoneField | PrimerFormFieldState? | Convenience accessor for phone field |
isLoading | Bool | Whether payment is submitting |
isTerminal | Bool | Whether payment reached terminal state |
PrimerFormFieldState
| Property | Type | Description |
|---|---|---|
fieldType | FieldType | .otpCode or .phoneNumber |
value | String | Current text value |
isValid | Bool | Whether the value passes validation |
errorMessage | String? | Validation error message |
placeholder | String | Placeholder text |
label | String | Display label |
helperText | String? | Helper text below field |
keyboardType | KeyboardType | Keyboard type for input |
maxLength | Int? | Max length (nil = unlimited) |
countryCodePrefix | String? | Display prefix for phone fields |
dialCode | String? | Dial code for session info |
Payment methods
| Payment Method | Type String | Field Type |
|---|---|---|
| BLIK | "ADYEN_BLIK" | OTP code (6 digits) |
| MBWay | "ADYEN_MBWAY" | Phone number |
See also
Scopes overview
All available scopes