Line items were added to support billing, some payment method types who support them too, and things like fees for using particular payment methods. However, billing has long since been removed from Payment (as it had nothing to do with payment processing). One notable point of annoyance has been the tax property of line items. In essence, Payment just transfers money. It may be useful to describe what that money is for, but this issue is about discussing how much detail we want to put in that.

Do we really need the tax and quantity properties, or do they actually only make life harder?

Postponed to version 7.x-2.x.

Comments

xano’s picture

If we remove any of the tax and quantity properties, we need to think about an upgrade path that keeps the line item's total amount intact.

Anonymous’s picture

You are right that billing and paying are two different things. However online both are related because the billing is input for the paying process.

Maybe the lineitems are more comparable with the lines of a receipt you get in the brick and mortarshop. You avoid a connection problem when you maintain quantity and tax properties.

xano’s picture

Billing requires much more information than just quantities and tax rates, such as address information. Compare Payment to the POS payment terminal you find in retail stores: most will only show you the total amount, either on screen or on the receipt.

Anonymous’s picture

Yes, thats true. A clear cut boundary is important and makes it possible to build long lasting features on.

I think my question in http://drupal.org/node/1978354 can be cancelled because I can better construct the feature of taxrate et cetera as part of the specific site functionality.

Thank you for your explanation.

xano’s picture

We can leverage the plugin system for line item types:

  • Provide a line item interface that defines the methods and manipulates the properties found in PaymentLineItem.
  • Add a method to display the line item. Specific line items, such as those for Commerce or Ubercart orders, can use this to display a link to the order.
  • Require plugins to have a form element controller to create and edit line items. The default controller can use the payment_line_item form element.

Also see #1831506: Add optional descriptions to line item types.

xano’s picture

Version: 7.x-1.x-dev » 8.x-2.x-dev
Status: Postponed » Active
xano’s picture

Status: Active » Closed (duplicate)

This has been done as part of #2021625: Port payments to content entities.