- /**
- * Generate Checkout Api key
- *
- * @param $storeId
- * @return string
- */
- public function generateCheckoutApiKey($storeId)
- {
- $accesstoken = $this->getBamboraCheckoutConfigData(BamboraConstants::ACCESS_TOKEN, $storeId);
- $merchantNumber = $this->getBamboraCheckoutConfigData(BamboraConstants::MERCHANT_NUMBER, $storeId);
- $secrettoken = $this->decryptData($this->getBamboraCheckoutConfigData(BamboraConstants::SECRET_TOKEN, $storeId));
- $combined = $accesstoken . '@' . $merchantNumber .':'. $secrettoken;
- $encodedKey = base64_encode($combined);
- $apiKey = 'Basic '.$encodedKey;
- return $apiKey;
- }