diff --git a/app/Extensions/PaymentGateways/CryptoBot/CryptoBotExtension.php b/app/Extensions/PaymentGateways/CryptoBot/CryptoBotExtension.php index a2fb097c..c8569d38 100644 --- a/app/Extensions/PaymentGateways/CryptoBot/CryptoBotExtension.php +++ b/app/Extensions/PaymentGateways/CryptoBot/CryptoBotExtension.php @@ -54,7 +54,7 @@ class CryptoBotExtension extends AbstractExtension 'description' => "Заказ #{$payment->id} - " . $shopProduct->name, 'currency_type' => 'fiat', 'fiat' => $shopProduct->currency_code, - 'hidden_message' => 'Спасибо за перевод 💖', + 'hidden_message' => $settings->hidden_message, 'paid_btn_name' => 'callback', 'paid_btn_url' => route('payment.CryptoBotSuccess').'?payment=YGqvOf4I' ]); @@ -72,7 +72,7 @@ class CryptoBotExtension extends AbstractExtension static function success(Request $request): void { - Redirect::route('home')->with('success', 'Ваш платёж в обработке 💖')->send(); + Redirect::route('home')->with('success', 'Your payment is processing')->send(); return; } diff --git a/app/Extensions/PaymentGateways/CryptoBot/CryptoBotSettings.php b/app/Extensions/PaymentGateways/CryptoBot/CryptoBotSettings.php index 69b7415c..ff7e2037 100644 --- a/app/Extensions/PaymentGateways/CryptoBot/CryptoBotSettings.php +++ b/app/Extensions/PaymentGateways/CryptoBot/CryptoBotSettings.php @@ -24,7 +24,12 @@ class CryptoBotSettings extends Settings 'api_key' => [ 'type' => 'string', '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' => [ 'type' => 'boolean', diff --git a/app/Extensions/PaymentGateways/CryptoBot/migrations/2023_03_26_215801_create_cryptobot_settings.php b/app/Extensions/PaymentGateways/CryptoBot/migrations/2023_03_26_215801_create_cryptobot_settings.php index d0850264..2648f749 100644 --- a/app/Extensions/PaymentGateways/CryptoBot/migrations/2023_03_26_215801_create_cryptobot_settings.php +++ b/app/Extensions/PaymentGateways/CryptoBot/migrations/2023_03_26_215801_create_cryptobot_settings.php @@ -7,12 +7,14 @@ class CreateCryptoBotSettings extends SettingsMigration public function up(): void { $this->migrator->addEncrypted('cryptobot.api_key', null); + $this->migrator->addEncrypted('cryptobot.hidden_message', null); $this->migrator->add('cryptobot.enabled', false); } public function down(): void { $this->migrator->delete('cryptobot.api_key'); + $this->migrator->delete('cryptobot.hidden_message'); $this->migrator->delete('cryptobot.enabled'); } }