This would let us have multiple instances of a single payment method. We should also move the method configuration forms inside the plugins themselves so they are more self contained.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave created an issue. See original summary.

longwave’s picture

Assigned: Unassigned » longwave

Working on this.

longwave’s picture

Status: Active » Needs work
FileSize
29.13 KB

First pass, still needs the actual payment methods to be converted and the interfaces etc to be finished off.

longwave’s picture

Status: Needs work » Needs review
FileSize
64.44 KB

This will fail tests but I want to see which ones and how badly.

Status: Needs review » Needs work

The last submitted patch, 4: payment-config.patch, failed testing.

longwave’s picture

Status: Needs work » Needs review
FileSize
116.94 KB
longwave’s picture

FileSize
103.14 KB

Oops, needed to rebase first.

The last submitted patch, 6: payment-config.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 7: payment-config.patch, failed testing.

longwave’s picture

Status: Needs work » Needs review
FileSize
112.16 KB

Status: Needs review » Needs work

The last submitted patch, 10: payment-config.patch, failed testing.

longwave’s picture

Status: Needs work » Needs review
FileSize
119.69 KB

Status: Needs review » Needs work

The last submitted patch, 12: payment-config.patch, failed testing.

longwave’s picture

Status: Needs work » Needs review
FileSize
127.58 KB

Hopefully this will pass all tests; still needs a bit more cleanup but maybe that can be done in followups. Reviews and comments welcome, though!

TR’s picture

I say just commit it. I didn't check it extensively, but what I looked at looked fine and worked. Planning on doing the same thing for gateways?

Oh, there is one place where you use the entity.manager service instead of entity_type.manager ... don't want that creeping back in ...

longwave’s picture

Title: Convert payment methods into configuration entities » Convert payment methods and gateways into configuration entities

Yes. Credit card is no longer its own payment method, gateways will just subclass the credit card base class. I still need to create an interface and move the charge method to the class, and there are a few other cleanups we can do such as remove the credit card field selection from the UI and make it the responsibility of the implementing class to declare the fields it actually needs.

I will commit this later, and then keep the issue open for the followups.

  • longwave committed 8c4dbaa on 8.x-4.x
    Issue #2620956 by longwave: Convert payment methods into configuration...
longwave’s picture

Status: Needs review » Active
longwave’s picture

Hm, the tests are inconsistent, seems we get fails if the generated payment method label contains an &

Status: Needs review » Needs work

The last submitted patch, 20: escape-payment-options.patch, failed testing.

longwave’s picture

Status: Needs review » Needs work

The last submitted patch, 22: payment-config.patch, failed testing.

The last submitted patch, 22: payment-config.patch, failed testing.

The last submitted patch, 22: payment-config.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 26: escape-payment-options.patch, failed testing.

longwave’s picture

#26 works for me, I can't get any of those tests to fail. It's as if DrupalCI is not actually applying the patch...

  • longwave committed 61fd8d4 on 8.x-4.x
    Followup to issue #2620956: Fix escaping of payment method labels and...
longwave’s picture

Status: Needs work » Fixed

Still not entirely sure what those test fails are about, can't reproduce any of them locally. This seems stable enough to commit and mark as fixed, and let's deal with any fallout later.

  • longwave committed d972add on 8.x-4.x
    Issue #2620956 by longwave: Convert payment gateways into configuration...

Status: Fixed » Closed (fixed)

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