Open bartekmis opened 2 years ago
You should be able to access the decline code from the response using getDeclineCode()
. Those codes come from the bank, and their meaning will change from one bank to another. If you know the bank and have their codes, you can look up what the code means.
If I am understanding this category correctly, it looks like Opayo are doing the bank lookup for you, so you don't need all that bank detail locally. This driver doesn't [yet] read the decline code category, so it's not easily available to inspect. However, you should be able to find it in $response->getData()
in the meantime.
The Pi API reference describes the additionalDeclineCode
, additionalDeclineCodeDescription
and additionalDeclineCodeCategory
, but from what I can see, the other APIs don't have it documented yet, so may need a little experimentation to see how it works. Even the email is not quite accurate - the decline code categories are strings, 01
, 02
, 03
and 04
. There is nothing to lead us to assume they are numbers or will remain numbers.
So - the new properties in the reponse won't break anything, but do provide additional context - in an ever-growing landscape of payment providers - for acting on when payments are declined. This information is available through the Omnipay framework, but will need a little digging. A couple of new methods can be added to make access easier.
Hello everyone,
we have just received an email from Opayo:
If we use a simple card transation on the website using the omnipay-sagepay package - are we safe or should we change anything in our code? Or is it something to change in this repo?
Any thoughts would be much appreciated. Bartek