The purchase ID is the unique order ID that needs to be passed on to the acquirer to identify the order within the acceptant's system. Note that this is a *PURCHASE* identifier and not a payment ID. We can require implementations to pass on a purchase ID (which requires validation) or we can provide a default one (which would provide some more flexibility for simple implementations, such as a donation form).

1) How do we check for required object properties if there are so many properties, the contructor simply accepts one array and uses that to fill the object's properties?
2) Should we provide a default purchase ID at all?

Comments

xano’s picture

Title: What about missing transaction parameters (or what about an empty purchase ID?) » Check for missing required transaction properties
Assigned: Unassigned » xano
Category: bug » feature
Status: Active » Fixed

If the required transaction properties description, purchase ID or amount are missing, a watchdog error will be logged and the transaction will fail gracefully. Other properties are required as well, but they are passed on as required function parameters, are not passed on by implementers, or are part of the merchant configuration, which we assume is in order.

Added and committed to 6.x-1.x-dev.

Status: Fixed » Closed (fixed)

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

xano’s picture

Assigned: xano » Unassigned