thephpleague / omnipay-sagepay

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

Wrong `threeDSessionData` in sagepay direct #178

Open airnayden opened 2 years ago

airnayden commented 2 years ago

In public function getRedirectData() from src/Message/Response.php:

if ($creq = $this->getDataItem('CReq')) {
                return [
                    'creq' => $creq,
                    'threeDSSessionData' => $this->getVPSTxId(),
                ];
            }

threeDSSessionData comes wrapped in { }, which causes an error if we perform a redirect after (malformed), which makes it impossible to begin/complete the 3D challenge (if required). Trimming the curly brackets seems to be making the request correct and the challenge can be completed.