Skip to content

Commit

Permalink
Also use the hostname for the complete return button
Browse files Browse the repository at this point in the history
No need to parse this manually
  • Loading branch information
lazka committed Oct 31, 2023
1 parent dd784eb commit fc56f0d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/dbp-mono-processpayment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit fc56f0d

Please sign in to comment.