wip
This commit is contained in:
@@ -242,7 +242,32 @@ class ControllerExtensionModuleTgshop extends Controller
|
||||
100,
|
||||
100
|
||||
),
|
||||
'module_tgshop_owner_notification_template' => 'Новый заказ!',
|
||||
'module_tgshop_owner_notification_template' => <<<TEXT
|
||||
*Новый заказ \#{order_id}* в магазине *{store_name}*
|
||||
|
||||
*Покупатель:* {customer}
|
||||
*Email:* {email}
|
||||
*Телефон:* {phone}
|
||||
*IP:* {ip}
|
||||
|
||||
*Адрес доставки:*
|
||||
{address}
|
||||
|
||||
*Комментарий:*
|
||||
{comment}
|
||||
|
||||
*Сумма заказа:* {total}
|
||||
*Дата оформления:* {created_at}
|
||||
TEXT,
|
||||
'module_tgshop_customer_notification_template' => <<<TEXT
|
||||
Спасибо за Ваш заказ в магазине *{store_name}*
|
||||
|
||||
*Сумма заказа:* {total}
|
||||
*Дата оформления:* {created_at}
|
||||
|
||||
Мы свяжемся с вами при необходимости\.
|
||||
Хорошего дня\!
|
||||
TEXT,
|
||||
'module_tgshop_theme_light' => 'light',
|
||||
'module_tgshop_theme_dark' => 'dark',
|
||||
'module_tgshop_mainpage_products' => 'most_viewed',
|
||||
|
||||
1
module/oc_telegram_shop/upload/oc_telegram_shop/.env.production
Executable file
1
module/oc_telegram_shop/upload/oc_telegram_shop/.env.production
Executable file
@@ -0,0 +1 @@
|
||||
APP_DEBUG=false
|
||||
@@ -8,6 +8,11 @@ class TelegramValidateInitDataMiddleware
|
||||
{
|
||||
private SignatureValidator $signatureValidator;
|
||||
|
||||
private array $excluded = [
|
||||
'testTgMessage',
|
||||
'manifest',
|
||||
];
|
||||
|
||||
public function __construct(SignatureValidator $signatureValidator)
|
||||
{
|
||||
$this->signatureValidator = $signatureValidator;
|
||||
@@ -15,7 +20,11 @@ class TelegramValidateInitDataMiddleware
|
||||
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$this->signatureValidator->validate($request);
|
||||
$apiAction = $request->get('api_action');
|
||||
|
||||
if (! in_array($apiAction, $this->excluded, true)) {
|
||||
$this->signatureValidator->validate($request);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user