Skip to content

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

Open
@judgej

Description

@judgej

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions