The module ps_accounts is the interface between your module and PrestaShop's services. It manages:
- Shop Identification and Verification process;
- Providing tokens to communicate safely with PrestaShop services;
- Synchronize basic informations about the shops (ex: shop URLs, name, ...).
This module is a base component for other modules using PrestaShop services.
If you need to install and test the module, you can download the desired zip here.
We aims to follow partially the Prestashop compatibility charts
- Compatibility Chart Prestashop 1.6 & 1.7
- Compatibility Chart Prestashop 8.0
- Compatibility Chart Prestashop 9.0
| ps_accounts version | Prestashop Version | PHP Version |
|---|---|---|
| ^8.0.0 | >=1.6 && <= 9.x | PHP 5.6 - 8 |
| ^7.0.9 | >=1.6 && <= 9.x | PHP 5.6 - 8 |
| 7.x | >=1.6 && <9.x | PHP 5.6 - 8 |
If you are integrating a module, you should have a look on the PrestaShop Integration Framework Documentation.
- doesn't manage dependencies between modules;
- doesn't manage composer dependencies globally.
- check by yourself that the PsAccounts module is installed;
- ensure your vendor dependencies won't collide with existing ones.
(loaded by other modules OR coming from the PrestaShop Core)
| Method Name | PrestaShop AccessToken | Scopes | Legacy Firebase Shop Id Token |
Legacy Firebase User Id Token |
|---|---|---|---|---|
| >= v8.0.0 | ||||
| isShopIdentityCreated | Yes | Yes | No | |
| isShopIdentityVerified | Yes | shop.verified | Yes | No |
| isShopPointOfContactSet | Yes | shop.verified | Yes | Yes |
| < v8.0.0 | ||||
| isAccountLinked | Yes | shop.verified | Yes | Yes |
// /!\ TODO: Starting here you are responsible to check that the module is installed
/** @var Ps_accounts $module */
$module = \Module::getModuleIdByName('ps_accounts');
/** @var \PrestaShop\Module\PsAccounts\Service\PsAccountsService $service */
$service = $module->getService(\PrestaShop\Module\PsAccounts\Service\PsAccountsService::class);
try {
$jwtAccessToken = $service->getShopToken();
} catch (\PrestaShop\Module\PsAccounts\Account\Exception\RefreshTokenException $e) {
//
}// /!\ TODO: Starting here you are responsible to check that the module is installed
/** @var Ps_accounts $module */
$module = \Module::getModuleIdByName('ps_accounts');
/** @var \PrestaShop\Module\PsAccounts\Service\PsAccountsService $service */
$service = $module->getService(\PrestaShop\Module\PsAccounts\Service\PsAccountsService::class);
// With this one you can call your API's as the PrestaShop Account Shop
$jwtShop = $service->getOrRefreshToken();
// With this one you can call your API's as the PrestaShop Account Shop Owner
$jwtOwner = $service->getUserToken();In case you need to build a zip by yourself :
cp config.dist.php config.php
makeOR with multiple environments :
cp config.dist.php config.myenv.php
BUNDLE_ENV=myenv make