FIX: Remove Russian, Move Hidden Message to settings
This commit is contained in:
parent
69682665c5
commit
7bdd354820
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue