omnipay icon indicating copy to clipboard operation
omnipay copied to clipboard

[3.0] Extend ItemBag/Items to support more gateway features

Open judgej opened this issue 8 years ago • 14 comments

The OmniPay\Common\Item class holds a single item in the basket. It has a limited number of properties that can be set, and that puts some of the gateways to shame.

For example, the Item does not allow tax to be set, so there is no tax breakdown of items in the basket. The Sage Pay basket supports pages of metadata that can be sent in the basket, and that can be incredibly useful when reconciling payments with other systems.

I'll do some research and see how other systems do it. I think a list of the common features would be good, but expanded a bit beyond what is supported at the moment. Expanding the field list a little now would help standardise these additional field names (e.g. netPrice, grossPrice, tax, taxRate, with perhaps intellegent derivations of some of these fields if only some are provided).

After that, a means to push in arbitrary fields that may just be needed for one specific gateway or application, would be great. A means for the gateway to "declare" what these additional fields are, would help a lot, but I'm not sure what form that would take.

judgej avatar Jan 23 '16 13:01 judgej