From fc56f0dbcdf9cb15e9e9ad98e203b1936a94a470 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Tue, 31 Oct 2023 16:13:52 +0100 Subject: [PATCH] Also use the hostname for the complete return button No need to parse this manually --- src/dbp-mono-processpayment.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/dbp-mono-processpayment.js b/src/dbp-mono-processpayment.js index f0994f7..a9cc715 100644 --- a/src/dbp-mono-processpayment.js +++ b/src/dbp-mono-processpayment.js @@ -776,16 +776,11 @@ class DbpMonoProcessPayment extends ScopedElementsMixin(DBPMonoLitElement) { getReturnButtonString() { const i18n = this._i18n; - - let str = this.returnUrl; + let str = this.returnHostname; if (!str) { return i18n.t('complete.return-button-text'); } - str = str.replace('https://', ''); - str = str.split('/'); - if (!str) return i18n.t('complete.return-button-text'); - - return i18n.t('complete.return-button-text-name', {name: str[0]}); + return i18n.t('complete.return-button-text-name', {name: str}); } static get styles() {