-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,5 +54,5 @@ | |
"wallee/sdk": "3.0.1" | ||
}, | ||
"type": "shopware-platform-plugin", | ||
"version": "4.0.11" | ||
"version": "4.0.12" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace WalleePayment\Core\Util\Analytics; | ||
|
||
use Wallee\Sdk\ApiClient; | ||
|
||
/** | ||
* Class Analytics | ||
* | ||
* @package WalleePayment\Core\Util\Analytics | ||
*/ | ||
class Analytics { | ||
|
||
public const SHOP_SYSTEM = 'x-wallee-shop-system'; | ||
public const SHOP_SYSTEM_VERSION = 'x-wallee-shop-system-version'; | ||
public const SHOP_SYSTEM_AND_VERSION = 'x-wallee-shop-system-and-version'; | ||
public const PLUGIN_FEATURE = 'x-wallee-shop-plugin-feature'; | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public static function getDefaultData() | ||
{ | ||
return [ | ||
self::SHOP_SYSTEM => 'shopware', | ||
self::SHOP_SYSTEM_VERSION => '6', | ||
self::SHOP_SYSTEM_AND_VERSION => 'shopware-6', | ||
]; | ||
} | ||
|
||
/** | ||
* @param \Wallee\Sdk\ApiClient $apiClient | ||
*/ | ||
public static function addHeaders(ApiClient &$apiClient) | ||
{ | ||
$data = self::getDefaultData(); | ||
foreach ($data as $key => $value) { | ||
$apiClient->addDefaultHeader($key, $value); | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters