FIX: Remove Russian, Move Hidden Message to settings

This commit is contained in:
Gru 2024-04-11 15:56:07 +10:00
parent 69682665c5
commit 7bdd354820
3 changed files with 10 additions and 3 deletions

View file

@ -54,7 +54,7 @@ class CryptoBotExtension extends AbstractExtension
'description' => "Заказ #{$payment->id} - " . $shopProduct->name, 'description' => "Заказ #{$payment->id} - " . $shopProduct->name,
'currency_type' => 'fiat', 'currency_type' => 'fiat',
'fiat' => $shopProduct->currency_code, 'fiat' => $shopProduct->currency_code,
'hidden_message' => 'Спасибо за перевод 💖', 'hidden_message' => $settings->hidden_message,
'paid_btn_name' => 'callback', 'paid_btn_name' => 'callback',
'paid_btn_url' => route('payment.CryptoBotSuccess').'?payment=YGqvOf4I' 'paid_btn_url' => route('payment.CryptoBotSuccess').'?payment=YGqvOf4I'
]); ]);
@ -72,7 +72,7 @@ class CryptoBotExtension extends AbstractExtension
static function success(Request $request): void static function success(Request $request): void
{ {
Redirect::route('home')->with('success', 'Ваш платёж в обработке 💖')->send(); Redirect::route('home')->with('success', 'Your payment is processing')->send();
return; return;
} }

View file

@ -24,7 +24,12 @@ class CryptoBotSettings extends Settings
'api_key' => [ 'api_key' => [
'type' => 'string', 'type' => 'string',
'label' => 'API Key', 'label' => 'API Key',
'description' => 'The API Key of your Mollie App', 'description' => 'The API Key of your CryptoPay app',
],
'hidden_message' => [
'type' => 'string',
'label' => 'Hidden Message',
'description' => 'Message displayed after payment',
], ],
'enabled' => [ 'enabled' => [
'type' => 'boolean', 'type' => 'boolean',

View file

@ -7,12 +7,14 @@ class CreateCryptoBotSettings extends SettingsMigration
public function up(): void public function up(): void
{ {
$this->migrator->addEncrypted('cryptobot.api_key', null); $this->migrator->addEncrypted('cryptobot.api_key', null);
$this->migrator->addEncrypted('cryptobot.hidden_message', null);
$this->migrator->add('cryptobot.enabled', false); $this->migrator->add('cryptobot.enabled', false);
} }
public function down(): void public function down(): void
{ {
$this->migrator->delete('cryptobot.api_key'); $this->migrator->delete('cryptobot.api_key');
$this->migrator->delete('cryptobot.hidden_message');
$this->migrator->delete('cryptobot.enabled'); $this->migrator->delete('cryptobot.enabled');
} }
} }