Fired when a payment attempt finishes, whether for a one-off eWay purchase, an eWay recurring sign-up, or a scheduled recurring instalment retry. The retry case is fired by PaymentManager for any recurring transaction, not only eWay ones. Carries the resulting payment, and where relevant the recurring subscription and customer details, as event attributes so trigger definitions and email templates can read the amount, gateway response code and outcome. The event id is "payment"; trigger item 1 records whether the payment was recurring, trigger item 2 carries the gateway response code, and trigger item 4 maps the payment state to success, failure or timeout.
Implements: TriggerEvent
Properties
| Property | Returns | Description |
|---|---|---|
| attributes | Map<String,Object> | Event attributes keyed by "payment", "recurring" and "customer", holding the payment, recurring subscription and eWay customer details relevant to this event. |
| eventId | String | Identifies this event type for trigger matching and persistence. |
| sourceProfile | Profile | Profile who made or owns the payment: the purchaser for a one-off or recurring purchase. |
| triggerItem1 | String | Whether the payment that triggered this event was a recurring transaction. |
| triggerItem2 | String | Gateway response code for the payment, when a payment attribute is present on this event. |
| triggerItem3 | String | Identifier of the website the payment was made on. |
| triggerItem4 | String | Outcome of the payment attempt. |
| triggerItem5 | String | Unused for payment events. |
| website | Website | Website the payment was made on. |
Inherited from TriggerEvent
Properties
| Property | Returns | Description |
|---|---|---|
| serialisable | boolean | Whether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here. |
Methods
isSerialisable()
Returns: boolean
Whether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.
Methods
getSourceProfile() · getEventId() · getWebsite() · getTriggerItem1() · getTriggerItem2() · getTriggerItem3() · getTriggerItem4() · getTriggerItem5() · getAttributes()
getSourceProfile()
Returns: Profile
Profile who made or owns the payment: the purchaser for a one-off or recurring purchase.
getEventId()
Returns: String
Identifies this event type for trigger matching and persistence.
getWebsite()
Returns: Website
Website the payment was made on.
getTriggerItem1()
Returns: String
Whether the payment that triggered this event was a recurring transaction.
getTriggerItem2()
Returns: String
Gateway response code for the payment, when a payment attribute is present on this event.
getTriggerItem3()
Returns: String
Identifier of the website the payment was made on.
getTriggerItem4()
Returns: String
Outcome of the payment attempt.
getTriggerItem5()
Returns: String
Unused for payment events.
getAttributes()
Returns: Map<String,Object>
Event attributes keyed by "payment", "recurring" and "customer", holding the payment, recurring subscription and eWay customer details relevant to this event.