-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order status only one of three options #104
Comments
Thanks. Sounds like some finer control is needed over the service types. I'll read up and summarise the state transitions that needs to be supported, to check that my understanding is correct. Ideally it would all fit into the Omnipay sequence, but have options that modifies that sequence (e.g. so Does that make sense? |
The Notify handler (transaction asynchronous response for Server API) can receive any of these statuses:
An ABORT can happen:
Omnipay has statuses:
Note that because an AUTHENTICATE can be captured (AUTHORISE) in multiple transaction up to the 115% mark, each transaction can go through its own ABORT before it is cleared the next day. A single transaction can branch out like this in quite a complicated way. A transaction can always be voided before it is cleared in the morning, so be aware an OK is not a final state for up to 24 hours. Once it has cleared, then it can no longer be voided, and would need to be refunded instead to cancel it. |
The Direct API also needs to handle the response status. This API has all the same statuses as the Server API (via the notification handler) except PENDING, and in addition it has:
|
There were both properties previously. Moved to methods for a more dynamic use, where the service can change according to a modifying parameter. Removed __construct() from Response, as we are only passing an array in as data now to initialise, and not a body object. This was a legacy left-over, and good to finally remove it.
…reference Previouslt it often returned a partial reference containing just the data supplied by the merchant site. If there is no authorisation data supplied by the gateway, then it is appropriate for the transactionReference to be null to indicate this.
Release 3.1.0 |
As per the notes for both v2 and v3, SagePay only ever seems to return one of three states: STATUS_COMPLETED, STATUS_PENDING or, and the default, STATUS_FAILED.
We have an integration problem, where we are using the authorize() function and this always sends a DEFERRED payment. In some cases payments should/could be AUTHENTICATE. However, using the authorize() callback we're only ever going to get DEFERRED. A setTxType() would be ideal in side DirectGateway. Which, if using Authorize, you could override the default action.
Similarly, when payments are returned acceptNotification() will only ever return one of three states: STATUS_COMPLETED, STATUS_PENDING or, and the default, STATUS_FAILED. This was already raised here: #42
Therefore, each successful transaction that returns an AUTHENTICATED state technically fails, even though its not failed. My understanding of "$gateway->capture([...]);" is that it will release the funds immediately and stops using the acceptNotification(), which has been advised in issue #69.
The text was updated successfully, but these errors were encountered: