Skip to content
Code-Schnipsel Gruppen Projekte
Commit 2511f667 erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

fix: make Amazon widgets reloadable

Übergeordneter 262a45c7
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -105,19 +105,18 @@ define('package/quiqqer/payment-amazon/bin/controls/PaymentDisplay', [
widgetUrl = 'https://static-eu.payments-amazon.com/OffAmazonPayments/eur/lpa/js/Widgets.js';
}
if (typeof amazon !== 'undefined') {
this.$showAmazonPayBtn();
return;
}
this.$OrderProcess.Loader.show();
if (typeof window.onAmazonPaymentsReady === 'undefined') {
window.onAmazonPaymentsReady = this.$showAmazonPayBtn;
}
window.onAmazonPaymentsReady = this.$showAmazonPayBtn;
window.onAmazonLoginReady = this.$onAmazonLoginReady;
if (typeof amazon !== 'undefined') {
var ScriptElm = document.getElement('script[src="' + widgetUrl + '"]');
if (typeof window.onAmazonLoginReady === 'undefined') {
window.onAmazonLoginReady = this.$onAmazonLoginReady;
if (ScriptElm) {
amazon = null;
ScriptElm.destroy();
}
}
new Element('script', {
......@@ -145,7 +144,7 @@ define('package/quiqqer/payment-amazon/bin/controls/PaymentDisplay', [
this.$AuthBtnElm.removeClass('quiqqer-payment-amazon__hidden');
OffAmazonPayments.Button(
'quiqqer-payment-amazon-btn',
this.$AuthBtnElm.get('id'),
this.getAttribute('sellerid'),
{
type : 'PwA',
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren