Port the payment form field and add it to Payment, as the different plugins will be so small and independent that it hardly makes any sense to keep them in a separate module anymore.

Comments

xano’s picture

Depends on #2047919: Add a payment add form controller, and #1896416: Use contexts as payment bundles so the context can store an entity reference to the entity the form is attached to.

xano’s picture

Assigned: xano » Unassigned
Status: Active » Needs work
StatusFileSize
new21.96 KB
xano’s picture

Field types are now plugins. See https://drupal.org/node/2064123.

xano’s picture

StatusFileSize
new36.46 KB
xano’s picture

StatusFileSize
new48.27 KB

This patch keeps the field in a separate module, because a configurable entity reference field is use to link payments to the entities they were made from. We may be able to make this dependency optional and merge the field into the main module anyway.

xano’s picture

StatusFileSize
new48.86 KB

One problem is that every field requires one payment currency and an undefined number of line items. Field storage cannot handle this. Two possible solutions are:

  1. Set the payment currency code in the instance, but that means that all payment forms of the same instance will have a predefined currency.
  2. Find the payment currency based on the line items, e.g. use the first line item's currency.
xano’s picture

Title: Port the payment form field and add it to Payment » Port the payment form field
xano’s picture

StatusFileSize
new49.97 KB

The field type and widget plugins work and are tested. The formatter and payment context plugins need work, and so will the entity form controller that is added for the formatter to use.

Let's fix #2089375: Remove payment method plugin payment operations and #2089355: Store payments' payment method configuration before we continue with this patch, so we won't have to rework form execution later on anymore.

xano’s picture

StatusFileSize
new60.91 KB

The three field plugins are done and tested. The payment type plugin seems to work as well, but needs more testing.

The biggest problem now is that payment type derivatives contain a colon, which is not allowed in filenames. See #2035345: Reconsider whether to use ':' as separator for derivative plugins.

xano’s picture

StatusFileSize
new66.78 KB

Working on the upgrade path.

xano’s picture

Status: Needs work » Fixed
StatusFileSize
new56.25 KB

Because of #2035345: Reconsider whether to use ':' as separator for derivative plugins and #2107713: Remove the upgrade path, the upgrade path and entity references to the source entities were dropped.

Status: Fixed » Closed (fixed)

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