omnipay-sagepay icon indicating copy to clipboard operation
omnipay-sagepay copied to clipboard

Getting Error "The ACS has provided an Erro message. CReq validation failure." when submitting the form.

Open SM-Prasad opened this issue 3 years ago • 3 comments
trafficstars

I have submitted the test data and getting error

"The ACS has provided an Erro message. CReq validation failure."

I have checked about the issue and found that it is because "{}" in vpsTxId and I have tried by removing the paranthesis and then it's working fine. But the form html is inside vendor folder which we can't modify directly. File Path => vendor\omnipay\common\src\Common\Message\AbstractResponse.php

Would anyone suggest how to fix this?

SM-Prasad avatar Oct 27 '22 12:10 SM-Prasad

Can you provide any additional details? What is failing, and what are you doing when it fails?

judgej avatar Oct 27 '22 15:10 judgej

I have replaced {} in hidden field value in file path vendor\omnipay\common\src\Common\Message\AbstractResponse.php that and then it's working fine.

Replaced below code

 $output = sprintf(
            $output,
            htmlentities($this->getRedirectUrl(), ENT_QUOTES, 'UTF-8', false),
           $hiddenFields
        );

With

 $output = sprintf(
            $output,
            htmlentities($this->getRedirectUrl(), ENT_QUOTES, 'UTF-8', false),
            str_replace(array("{", "}"), "", $hiddenFields)
        );

And then it's working fine. As it removes the {} which gets added to vpsTxId.

Please suggest me solution for this as I have changed in vendor folder which is not a proper way.

SM-Prasad avatar Oct 28 '22 06:10 SM-Prasad

Some workarounds here: https://stackoverflow.com/questions/71424620/sagepa-3ds2-3377-the-acs-has-provided-an-erro-message-creq-validation-failure

judgej avatar Oct 28 '22 09:10 judgej