thephpleague / omnipay-sagepay

Sage Pay driver for the Omnipay PHP payment processing library
MIT License
54 stars 78 forks source link

Update Server and Direct gateways to support protocol version 4.0 #173

Closed nfourtythree closed 2 years ago

nfourtythree commented 2 years ago

This pull request provides an update to the protocol version for the impending 14th March deadline imposed by Opayo/SagePay. The PR is only related to the change in protocol and does not add any other integrations.

Both the Direct and Server gateways are updated to work with the new protocol.

Points of note

Merging this will help us release a new version of our SagePay plugin to meet the upcoming requirement changes being enforced by Opayo.

This will also resolve the craftcms/commerce-sagepay#20 issue that we have outstanding, in which we will create a new release for people to update to after this package has been updated.

Let me know your feedback and thoughts, thanks!

barryvdh commented 2 years ago

Thanks, can you look into the tests?

nfourtythree commented 2 years ago

Just to note I have also reverted the PHP change. There are too many dependencies issues to go back down to ^7.2 so have bumped it back to ^7.3

barryvdh commented 2 years ago

Branch alias is bumped to 4.0 so you can test with ^4@dev

jamieburchell commented 2 years ago

@nfourtythree @barryvdh What happens when this is introduced in to a project where there are pending protocol v3 transactions? Will the signature checks fail/mismatch, or is it OK because the new fields will be empty strings and not affect the signature?

barryvdh commented 2 years ago

No clue

steveWinter commented 2 years ago

No clue

Apparently neither had I (hence why I deleted the comment) - I'd been trying to update league/omnipay and not omnipay/sagepay 🤦

barryvdh commented 2 years ago

Yeah no I saw your mistake there but your comment was gone 😅

No clue was about the switch between V3 and V4 mid transaction

jamieburchell commented 2 years ago

I tried it - registered the transaction with old protocol 3 code, upgraded to protocol 4 code, completed transaction. It worked and showed protocol version 4 in the notification data. I was expecting it to say 3, since the documentation says it's whatever was supplied originally, but whatever.

terryupton commented 2 years ago

I left a note on the Craft Commerce thread https://github.com/craftcms/commerce-sagepay/issues/20

We have tested this on both a standard install and a slightly custom install with some additional functionality around tokens and both sites are working fine and transactions are working as expected.