I was getting this error too.
I managed to fix it by doing the following;
1. In your Barclaycard account go to Configuration / Technical information / Global transaction parameters: Set Sale as Default operation code
2. Under Configuration / Technical information/ Global security params: Set Hash algorithm to SHA-1
3. Under Configuration / Technical information/ Data and Origin verification: Set the URL of the checkout page to your full URL so https://www.domain.com/checkout/and SHA-IN pass phrase. This value must be copied in the plugins configuration page in SHA-IN value.
4. Under Configuration / Technical information / transaction feedback: Create the SHA-OUT pass phrase and make sure this value is copied exactly into the SHA-Out value in the plugin settings.
Hi @strandcreative
Thank you so much. It worked.
Looks like I initially did everything right but the Hash algorithm was set to SHA-256.
When I changed it back to SHA-1 as you said, it worked.
But is there any fix or something to be able to still use SHA-256 and make it work? Because I need to integrate multiple URLs on the data origin and other non-WordPress websites have SHA-256 already used on them. So changing hash algorithm might break those websites.
Please let me know.
Thanks
-
This reply was modified 2 years ago by
bibekkc.
FYI,
I managed to fix the issue with using a hash algorithm other than SHA-1 (i.e. SHA-256 and SHA-512)
Replaced ‘sha1‘ on classes/rapiddive_wc_gateway_barclay.php with ‘sha256‘ (on line 354)
$shasig = strtoupper(hash('sha1', $shasig));
to
$shasig = strtoupper(hash('sha256', $shasig));
edit:
The ‘Transaction is unsuccessfull!’ message after payment was shown because the plugin only supports SHA-1 but I had to use SHA-256 on my Back-Office configuration.
(plugin version: 2.3.0)
p.s. I have not tested this with SHA-512 😉
-
This reply was modified 2 years ago by
bibekkc.
-
This reply was modified 2 years ago by
bibekkc.
Hi @bibekkc ,
Thanks for the update, can you make a PR for me and i will release globally after checking the solution.
https://github.com/rapiddive/catchtheweb-barclay-epdq-payment-gateway
Thanks,