Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

PaymentMethodConfig indicating what fields it needs for billing (possibly validation?) #1948

Closed
nerrad opened this issue Mar 11, 2020 · 1 comment
Labels
category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. type: enhancement The issue is a request for an enhancement.
Milestone

Comments

@nerrad
Copy link
Contributor

nerrad commented Mar 11, 2020

This issue is initially for consideration/discussion as an alternative to validation proposed as a part of onCheckoutDataProcessing event in #1939 .

For this alternative, Checkout would still be responsible for rendering billing data fields (fields not specific to payment method like cc, or cc expiry etc), but payment methods would indicate what fields are required as a part of their registration process.

So for example, they might register something like this as a part of the configuration:

const config = {
 ...existingConfig,
billingFieldsRequired: [ 'country', 'state', 'postalCode' ],
};

Then checkout can use this as a signal for setting/validating those fields as required when processing and that payment method is selected/active.

We might still want to allow for payment methods to do additional validation (as per #1939) but this can put the billing field validation into the checkout.

@nerrad nerrad added action: needs feedback category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. type: enhancement The issue is a request for an enhancement. labels Mar 11, 2020
@nerrad nerrad added this to the Future Release milestone Mar 11, 2020
@nerrad
Copy link
Contributor Author

nerrad commented May 1, 2020

This is no longer applicable so closing.

@nerrad nerrad closed this as completed May 1, 2020
@nerrad nerrad modified the milestones: Future Release, 2.6.0 May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant