Found a number of problems while reviewing #2905028: Add a per-gateway setting to skip collecting billing information:

1) PaymentMethodAddForm and PaymentMethodEditForm use Profile:: even though the entity type manager is injected.
2) PaymentMethodAddForm has route-or-default-store logic which duplicates the resolved store logic. We should inject the currentStore service and get the store from there instead.
3) PaymentMethodEditForm doesn't validate the newly entered CC expiration date.

Plus, we could use a PaymentMethodFormBase, which injects the common dependencies and handles the billing information.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Status: Active » Needs review
FileSize
17.89 KB

Let's try this.

bojanz’s picture

Status: Needs review » Fixed

Committed.

  • bojanz committed b3e9c61 on 8.x-2.x
    Issue #3050301 by bojanz: Clean up the payment method plugin forms
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.