diff --git a/app/code/community/Svea/Checkout/Model/Checkout/Api/BuildOrder.php b/app/code/community/Svea/Checkout/Model/Checkout/Api/BuildOrder.php index 069e1f1..534e2cd 100644 --- a/app/code/community/Svea/Checkout/Model/Checkout/Api/BuildOrder.php +++ b/app/code/community/Svea/Checkout/Model/Checkout/Api/BuildOrder.php @@ -183,7 +183,7 @@ protected function _setupOrderConfig($sveaOrder, $quote) //To avoid order already being created, if you for example have //stageEnv/devEnv and ProductionEnv with quote id in same range. $allowedLength = 32; - $separator = '_'; + $separator = '_q_m1_'; $lengthOfHash = $allowedLength - (strlen((string)$quoteId) + strlen($separator)); $hashedBaseUrl = sha1(Mage::getBaseUrl()); $clientId = $quoteId . $separator . mb_substr($hashedBaseUrl, 0, $lengthOfHash); diff --git a/app/code/community/Svea/Checkout/Model/Payment/Acknowledge.php b/app/code/community/Svea/Checkout/Model/Payment/Acknowledge.php index 7919076..56ef215 100755 --- a/app/code/community/Svea/Checkout/Model/Payment/Acknowledge.php +++ b/app/code/community/Svea/Checkout/Model/Payment/Acknowledge.php @@ -38,7 +38,7 @@ public function acknowledge($quote, $mode, $sveaId) $useForReference = Mage::getStoreConfig('payment/sveacheckout_dev_settings/reference'); if (in_array($useForReference , ['suffixed-increment-id','suffixed-order-id'])) { $reference = $sveaReference; - $separator = '_'; + $separator = '_o_m1_'; $lastChar = strrpos ($reference , $separator,0); $reference = substr($reference,0, $lastChar); if ($useForReference == 'suffixed-increment-id') { diff --git a/app/code/community/Svea/Checkout/controllers/ValidationController.php b/app/code/community/Svea/Checkout/controllers/ValidationController.php index 3d1a4dd..c3e5683 100755 --- a/app/code/community/Svea/Checkout/controllers/ValidationController.php +++ b/app/code/community/Svea/Checkout/controllers/ValidationController.php @@ -152,7 +152,7 @@ protected function _makeSveaOrderId($orderId) //To avoid order already being created, if you for example have //stageEnv/devEnv and ProductionEnv with quote id in same range. $allowedLength = 32; - $separator = '_'; + $separator = '_o_m1_'; $lengthOfHash = $allowedLength - (strlen((string)$reference) + strlen($separator)); $hashedBaseUrl = sha1(Mage::getBaseUrl()); $clientId = $reference . $separator . mb_substr($hashedBaseUrl, 0, $lengthOfHash);