Replies: 4 comments
-
FYI: See also craftcms/commerce-omnipay#8 |
Beta Was this translation helpful? Give feedback.
-
@timeverts Is the settlement date always found in the gateway response data (even if just for your gateway), and if so, are you asking that it is shown on the transaction row itself? |
Beta Was this translation helpful? Give feedback.
-
@lukeholder, sorry for the delayed response. Yes, usually if the settlement date is known, it would normally be returned as part of the gateway response data. Some examples are:
As mentioned earlier, some responses will not contain a settlement date at all because the gateway simply doesn't return anything about it or the payment may not have settled yet. On a side note (but not necessarily required), in cases where the settlement date cannot be directly retrieved from the response data, but the strategy for calculating the settlement date is known, the With regards to showing the settlement date in the transaction row, I wasn't specifically asking for that to be done, but it would be useful if it were possible to show it there. Perhaps if there was some sort of template hook perhaps to allow adding custom columns into the transaction row. |
Beta Was this translation helpful? Give feedback.
-
Hi @lukeholder, just picking up this discussion again (after a long time!) as I'll be needing to retrieve the settlement date of a transaction for an upcoming project. What further information do you require to investigate this request? |
Beta Was this translation helpful? Give feedback.
-
In various projects we've developed we often need to retrieve the settlement date for a transaction (if it's available) and pass that onto a third-party (through a custom plugin) together with other transaction details. In the past we've achieved this by creating a custom method in our plugin that extracts the settlement date from a transaction response. Considering the response for each Gateway is very different, our plugin could only account for the gateways we knew the site would be using and implement relevant code to extract the settlement date from that gateway's transaction response data.
It would be much nicer if there was a common method for each gateway that could provide the settlement date for a transaction (if it can be determined and is applicable for the transaction type).
So could you consider adding a new method to
craft\commerce\base\Gateway
for returning the settlement date of a transaction?For example:
I'm happy to submit a pull request if you're happy with the idea.
Beta Was this translation helpful? Give feedback.
All reactions