diff --git a/lib/Order.php b/lib/Order.php index 82610a8..c823998 100644 --- a/lib/Order.php +++ b/lib/Order.php @@ -43,7 +43,11 @@ public function __construct($order) } if ($this->is3DSOrder) { - $_SESSION['worldpay_sessionid'] = uniqid(); + if (isset($order['shopperSessionId']) && $order['shopperSessionId']) { + $_SESSION['worldpay_sessionid'] = $order['shopperSessionId']; + } else { + $_SESSION['worldpay_sessionid'] = uniqid(); + } $threeDSShopper = Utils::getThreeDSShopperObject(); $this->shopperIpAddress = $threeDSShopper['shopperIpAddress']; $this->shopperSessionId = $threeDSShopper['shopperSessionId'];