From 50ea2d0bb17ea34788c1956579542658dbc7fd10 Mon Sep 17 00:00:00 2001 From: 021-projects <20326979+021-projects@users.noreply.github.com> Date: Sat, 2 Mar 2024 14:22:37 +0200 Subject: [PATCH] fix(provider): trim '/' in host option --- src/addons/BS/BtcPayProvider/Payment/BTCPayServer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/addons/BS/BtcPayProvider/Payment/BTCPayServer.php b/src/addons/BS/BtcPayProvider/Payment/BTCPayServer.php index 6558836..a4d30ff 100644 --- a/src/addons/BS/BtcPayProvider/Payment/BTCPayServer.php +++ b/src/addons/BS/BtcPayProvider/Payment/BTCPayServer.php @@ -179,6 +179,8 @@ public function verifyConfig(array &$options, &$errors = []) $storeId = $options['store_id'] ?? ''; $secret = $options['secret'] ?? ''; + $host = $options['host'] = rtrim($host, '/'); + if (! $host) { $errors[] = \XF::phrase('btcpayprovider_host_required'); }