The Payment Method Selector Field subcomponent can only be used within the Form component.
The Payment Method Selector Field provides a way for customers to select their payment method. This subcomponent should always be used with the Payment Manager subcomponent, which will capture the customer's payment information. These 2 subcomponents should be used instead of the Payment Fields subcomponent when you want to show data in between the selector and the payment input.
If you're using conditional subcomponents, the "Payment method selected" condition will use what the customer selects in this subcomponent.
An example of payment methods listed in the Payment Method Selector Field subcomponent.
Validation
The payment field is a required field, if selectFirstPaymentType is set to false, and a user tries to submit the form without selecting a payment method, the form will not submit and the user will be displayed with the invalid validation.
Invalid form feedback, as defined by Invalid message if option not selected" prop.
Props
Prop ID | Prop Label | Type | Default Value | Info |
---|---|---|---|---|
methodNotSelectedMessage | Invalid message if option not selected | string | Please select a payment method |
If selectFirstPaymentType is set to false, and user submits form without select option, this invalid message will display below the payment options. |
selectFirstPaymentType |
Preselect First Payment Type
|
boolean
|
false |
Determines whether the first payment type should be selected by default. |
fieldClassName
|
Class Name
|
string
|
"" |
The CSS class name for styling the field component |
Comments
0 comments
Please sign in to leave a comment.