From 38b2173b4e18e5bcb020f01232dd22434491d29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=BCller?= Date: Mon, 14 Oct 2024 21:33:00 +0200 Subject: [PATCH] Fix: Show error notification only in case of an error --- .../src/module/payone-payment/page/payone-settings/index.js | 3 ++- src/Resources/public/administration/js/payone-payment.js | 2 +- src/Resources/public/static/css/{907.css => 369.css} | 0 src/Resources/public/static/css/{992.css => 397.css} | 0 src/Resources/public/static/css/{711.css => 535.css} | 0 src/Resources/public/static/css/{279.css => 545.css} | 0 src/Resources/public/static/css/{170.css => 56.css} | 0 src/Resources/public/static/css/{651.css => 663.css} | 0 src/Resources/public/static/css/{942.css => 723.css} | 0 src/Resources/public/static/css/{811.css => 899.css} | 0 .../js/{6a970e386e8781e26969.js => 17ed5bd529a49813a703.js} | 2 +- .../js/{0fa124d6fc506ed9d101.js => 291b7df2453adb3b7d6c.js} | 2 +- src/Resources/public/static/js/319b3325013fab2d6905.js | 1 + .../js/{cc9f2516cf45afcac262.js => 3901ed09467826470de4.js} | 2 +- src/Resources/public/static/js/56ca777193be9b70c72b.js | 1 - .../js/{51463d8e6606f3c77548.js => 6a3212b4cf68600a8718.js} | 2 +- .../js/{cd7aec9b5bf6efab3757.js => 7576b08bffbdb610dab3.js} | 2 +- src/Resources/public/static/js/8b0e20c3524d39a64204.js | 1 - .../js/{998c0278c5fa62629193.js => 93ee53f5004b8e0953a3.js} | 2 +- src/Resources/public/static/js/99116029fd5cc08b8b2e.js | 1 + src/Resources/public/static/js/9cddf1a52c2c3965b8f1.js | 1 - .../js/{add9457672729aa276d7.js => a6acacf23554885ed833.js} | 2 +- .../js/{5e443eaef4878f85be20.js => ad5aef0569df8471b8a2.js} | 2 +- src/Resources/public/static/js/cbc9d12b9ee276023e46.js | 1 - src/Resources/public/static/js/d025cd2c5ea617156ce8.js | 1 + src/Resources/public/static/js/d90f44ea6ffcf081e997.js | 1 - src/Resources/public/static/js/dd4be5705e0d3a95092d.js | 1 + .../js/{d7ef402503782a32b72c.js => de12faeb6c7c356ea640.js} | 2 +- src/Resources/public/static/js/f3325231b20f896fb153.js | 1 + 29 files changed, 17 insertions(+), 16 deletions(-) rename src/Resources/public/static/css/{907.css => 369.css} (100%) rename src/Resources/public/static/css/{992.css => 397.css} (100%) rename src/Resources/public/static/css/{711.css => 535.css} (100%) rename src/Resources/public/static/css/{279.css => 545.css} (100%) rename src/Resources/public/static/css/{170.css => 56.css} (100%) rename src/Resources/public/static/css/{651.css => 663.css} (100%) rename src/Resources/public/static/css/{942.css => 723.css} (100%) rename src/Resources/public/static/css/{811.css => 899.css} (100%) rename src/Resources/public/static/js/{6a970e386e8781e26969.js => 17ed5bd529a49813a703.js} (99%) rename src/Resources/public/static/js/{0fa124d6fc506ed9d101.js => 291b7df2453adb3b7d6c.js} (99%) create mode 100644 src/Resources/public/static/js/319b3325013fab2d6905.js rename src/Resources/public/static/js/{cc9f2516cf45afcac262.js => 3901ed09467826470de4.js} (89%) delete mode 100644 src/Resources/public/static/js/56ca777193be9b70c72b.js rename src/Resources/public/static/js/{51463d8e6606f3c77548.js => 6a3212b4cf68600a8718.js} (96%) rename src/Resources/public/static/js/{cd7aec9b5bf6efab3757.js => 7576b08bffbdb610dab3.js} (95%) delete mode 100644 src/Resources/public/static/js/8b0e20c3524d39a64204.js rename src/Resources/public/static/js/{998c0278c5fa62629193.js => 93ee53f5004b8e0953a3.js} (99%) create mode 100644 src/Resources/public/static/js/99116029fd5cc08b8b2e.js delete mode 100644 src/Resources/public/static/js/9cddf1a52c2c3965b8f1.js rename src/Resources/public/static/js/{add9457672729aa276d7.js => a6acacf23554885ed833.js} (95%) rename src/Resources/public/static/js/{5e443eaef4878f85be20.js => ad5aef0569df8471b8a2.js} (97%) delete mode 100644 src/Resources/public/static/js/cbc9d12b9ee276023e46.js create mode 100644 src/Resources/public/static/js/d025cd2c5ea617156ce8.js delete mode 100644 src/Resources/public/static/js/d90f44ea6ffcf081e997.js create mode 100644 src/Resources/public/static/js/dd4be5705e0d3a95092d.js rename src/Resources/public/static/js/{d7ef402503782a32b72c.js => de12faeb6c7c356ea640.js} (97%) create mode 100644 src/Resources/public/static/js/f3325231b20f896fb153.js diff --git a/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/index.js b/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/index.js index 4661ae25..3a502f62 100644 --- a/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/index.js +++ b/src/Resources/app/administration/src/module/payone-payment/page/payone-settings/index.js @@ -133,11 +133,12 @@ export default { } } } - }).finally((errorResponse) => { + }).catch((errorResponse) => { this.createNotificationError({ title: this.$tc('payone-payment.settingsForm.titleError'), message: this.$tc('payone-payment.settingsForm.messageTestError.general') }); + }).finally(() => { this.isTesting = false; }); }, diff --git a/src/Resources/public/administration/js/payone-payment.js b/src/Resources/public/administration/js/payone-payment.js index ebb4bbd0..ba85e9e0 100755 --- a/src/Resources/public/administration/js/payone-payment.js +++ b/src/Resources/public/administration/js/payone-payment.js @@ -1 +1 @@ -(function(){var e,t,n,a,i,r,o,s,l,d,p,c,u={352:function(){try{Shopware.Service("privileges").addPrivilegeMappingEntry({category:"additional_permissions",parent:null,key:"Payone",roles:{payone_order_management:{privileges:["payone_order_management","payone_payment_order_transaction_data:read","payone_payment_order_transaction_data:update","payone_payment_order_action_log:read","payone_payment_order_action_log:create","payone_payment_webhook_log:read","payone_payment_notification_forward:read","payone_payment_notification_forward:create"],dependencies:[]},payone_configuration:{privileges:["system_config:read","system_config:create","system_config:update","system_config:delete","currency:read","sales_channel:read","payone:configuration"],dependencies:[]},payone_webhook_forward:{privileges:["payone_payment_notification_target:read","payone_payment_notification_target:create","payone_payment_notification_target:update","payone_payment_notification_target:delete","payone:manage_webhook_forwards"],dependencies:[]},payone_webhook_resend:{privileges:["payone_webhook_resend"],dependencies:[]}}})}catch(e){}},309:function(){let{Application:e}=Shopware,t=Shopware.Classes.ApiService;class n extends t{constructor(e,t,n="payone_payment"){super(e,t,n)}validateApiCredentials(e){let n=this.getBasicHeaders();return this.httpClient.post(`_action/${this.getApiBasePath()}/validate-api-credentials`,{credentials:e},{headers:n}).then(e=>t.handleResponse(e))}getStateMachineTransitionActions(){let e=this.getBasicHeaders();return this.httpClient.get(`_action/${this.getApiBasePath()}/get-state-machine-transition-actions`,{headers:e}).then(e=>t.handleResponse(e))}hasApplePayCert(){let e=this.getBasicHeaders();return this.httpClient.get(`_action/${this.getApiBasePath()}/check-apple-pay-cert`,{headers:e}).catch(()=>!1).then(e=>!!e)}}e.addServiceProvider("PayonePaymentSettingsService",t=>new n(e.getContainer("init").httpClient,t.loginService))},437:function(){let{Application:e}=Shopware,t=Shopware.Classes.ApiService;class n extends t{constructor(e,t,n="payone"){super(e,t,n)}requeueNotificationForward(e){let n=`_action/${this.getApiBasePath()}/requeue-forward`;return this.httpClient.post(n,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}capturePayment(e){let n=`_action/${this.getApiBasePath()}/capture-payment`;return this.httpClient.post(n,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}refundPayment(e){let n=`_action/${this.getApiBasePath()}/refund-payment`;return this.httpClient.post(n,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}}e.addServiceProvider("PayonePaymentService",t=>new n(e.getContainer("init").httpClient,t.loginService))},38:function(){let{Component:e,Utils:t}=Shopware;e.extend("payone-payment-settings","sw-system-config",{inject:["PayonePaymentSettingsService"],methods:{_getShowPaymentStatusFieldsFieldName(e){return`PayonePayment.settings.${e}_show_status_mapping`},async readConfig(){this.stateMaschineOptions=await this.PayonePaymentSettingsService.getStateMachineTransitionActions().then(e=>e.data.map(e=>{let t=`payone-payment.transitionActionNames.${e.label}`,n=this.$t(t);return n===t&&(n=e.label),{id:e.value,name:n}})),await this.$super("readConfig"),this.config.forEach(e=>{let t=e.name.match(/^payment_(.*)$/),n=t?t[1]:null;n&&(this.addApiConfigurationFieldsToPaymentSettingCard(e,n),this.addPaymentStatusFieldsToPaymentSettingCard(e,n)),(e.name.startsWith("payment_")||"status_mapping"===e.name)&&(e.setShowFields=t=>{e.showFields=t,e.elements.forEach(e=>{e.hidden=!t}),this.showPaymentStatusFieldsBasedOnToggle(e)},e.setShowFields(!1))})},addApiConfigurationFieldsToPaymentSettingCard(e,n){let a=["merchantId","accountId","portalId","portalKey"],i=this.config.find(e=>"basic_configuration"===e.name),r=[];i.elements.forEach(e=>{let i=e.name.match(/\.([^.]+)$/),o=i?i[1]:null;if(!o||!a.includes(o))return;let s=t.object.cloneDeep(e);s.name=e.name.replace("."+o,"."+n+(o[0].toUpperCase()+o.slice(1))),s.config.helpText={"en-GB":"The basic configuration value is used, if nothing is entered here.","de-DE":"Es wird der Wert aus der Grundeinstellung verwendet, wenn hier kein Wert eingetragen ist."},r.push(s)}),e.elements=r.concat(e.elements)},addPaymentStatusFieldsToPaymentSettingCard(e,n){e.elements.push({config:{componentName:"sw-switch-field",label:{"en-GB":"Display state mapping configuration","de-DE":"Statusmappingkonfiguration einblenden"},helpText:{"en-GB":"If not configured the general status mapping config will be applied.","de-DE":"Sie k\xf6nnen f\xfcr jede Zahlungsart ein spezifisches Statusmapping konfigurieren. Existiert eine solche Konfiguration nicht, wird auf die allgemeine Konfiguration zur\xfcckgegriffen."}},name:this._getShowPaymentStatusFieldsFieldName(e.name)}),this.config.find(e=>"status_mapping"===e.name).elements.forEach(a=>{let i=t.object.cloneDeep(a);i.name=a.name.replace(".paymentStatus",`.${n}PaymentStatus`),e.elements.push(i)})},getElementBind(e,t){let n=this.$super("getElementBind",e,t);return(e.name.includes("PaymentStatus")||e.name.includes(".paymentStatus"))&&(n.config.options=this.stateMaschineOptions),n},getInheritWrapperBind(e){let t=this.$super("getInheritWrapperBind",e);return t.hidden=e.hidden,t},showPaymentStatusFieldsBasedOnToggle(e){let t=this.actualConfigData[this.currentSalesChannelId];if(!t)return;let n=t[this._getShowPaymentStatusFieldsFieldName(e.name)];e.elements.forEach(e=>{e.name.includes("PaymentStatus")&&(e.hidden=!n)})},emitConfig(){this.config.forEach(e=>this.showPaymentStatusFieldsBasedOnToggle(e)),this.$super("emitConfig")}}})},914:function(){let{Filter:e}=Shopware;e.register("payone_currency",(t,n,a)=>null===t?"-":(t/=100,e.getByName("currency")(t,n,a)))},988:function(e,t,n){Shopware.Component.register("payone-capture-button",()=>n.e(279).then(n.bind(n,279))),Shopware.Component.register("payone-order-items",()=>n.e(170).then(n.bind(n,170))),Shopware.Component.register("payone-payment-management",()=>n.e(651).then(n.bind(n,651))),Shopware.Component.register("payone-payment-order-action-log",()=>n.e(287).then(n.bind(n,287))),Shopware.Component.register("payone-payment-webhook-log",()=>n.e(567).then(n.bind(n,567))),Shopware.Component.register("payone-refund-button",()=>n.e(992).then(n.bind(n,992))),Shopware.Component.register("sw-order-detail-payone",()=>n.e(167).then(n.bind(n,167))),Shopware.Component.override("sw-order-detail",()=>n.e(536).then(n.bind(n,536))),Shopware.Module.register("sw-order-detail-tab-payone",{routeMiddleware(e,t){"sw.order.detail"===t.name&&t.children.push({name:"sw.order.detail.payone",path:"payone",component:"sw-order-detail-payone",meta:{parentPath:"sw.order.detail",meta:{parentPath:"sw.order.index",privilege:"order.viewer"}}}),e(t)}})}},h={};function g(e){var t=h[e];if(void 0!==t)return t.exports;var n=h[e]={id:e,exports:{}};return u[e](n,n.exports,g),n.exports}g.m=u,g.d=function(e,t){for(var n in t)g.o(t,n)&&!g.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},g.f={},g.e=function(e){return Promise.all(Object.keys(g.f).reduce(function(t,n){return g.f[n](e,t),t},[]))},g.u=function(e){return"static/js/"+({167:"51463d8e6606f3c77548",170:"d90f44ea6ffcf081e997",279:"56ca777193be9b70c72b",287:"998c0278c5fa62629193",301:"0fa124d6fc506ed9d101",355:"6a970e386e8781e26969",536:"add9457672729aa276d7",567:"cbc9d12b9ee276023e46",651:"8b0e20c3524d39a64204",711:"cc9f2516cf45afcac262",811:"9cddf1a52c2c3965b8f1",907:"d7ef402503782a32b72c",942:"cd7aec9b5bf6efab3757",992:"5e443eaef4878f85be20"})[e]+".js"},g.miniCssF=function(e){return"static/css/"+e+".css"},g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="administration:",g.l=function(n,a,i,r){if(e[n]){e[n].push(a);return}if(void 0!==i)for(var o,s,l=document.getElementsByTagName("script"),d=0;d Shop --> Zahlungsarten.","messageTestError":{"general":"Die API-Zugangsdaten konnten nicht validiert werden.","creditCard":"Die API-Zugangsdaten f\xfcr PAYONE Kreditkarte sind nicht korrekt.","prepayment":"Die API-Zugangsdaten f\xfcr PAYONE Vorkasse sind nicht korrekt.","debit":"Die API-Zugangsdaten f\xfcr PAYONE Lastschrift sind nicht korrekt.","paypalExpress":"Die API-Zugangsdaten f\xfcr PAYONE PayPal Express sind nicht korrekt.","paypal":"Die API-Zugangsdaten f\xfcr PAYONE PayPal sind nicht korrekt.","payolutionInstallment":"Die API-Zugangsdaten f\xfcr PAYONE Unzer Ratenkauf sind nicht korrekt.","payolutionInvoicing":"Die API-Zugangsdaten f\xfcr PAYONE Unzer Rechnungskauf sind nicht korrekt.","payolutionDebit":"Die API-Zugangsdaten f\xfcr PAYONE Unzer Lastschrift sind nicht korrekt.","sofort":"Die API-Zugangsdaten f\xfcr PAYONE Sofort \xdcberweisung sind nicht korrekt.","eps":"Die API-Zugangsdaten f\xfcr PAYONE eps \xdcberweisung sind nicht korrekt.","iDeal":"Die API-Zugangsdaten f\xfcr PAYONE iDEAL sind nicht korrekt.","secureInvoice":"Die API-Zugangsdaten f\xfcr PAYONE Gesicherter Rechnungskauf sind nicht korrekt.","openInvoice":"Die API-Zugangsdaten f\xfcr PAYONE Rechnungskauf sind nicht korrekt.","paydirekt":"Die API-Zugangsdaten f\xfcr PAYONE paydirekt sind nicht korrekt.","trustly":"Die API-Zugangsdaten f\xfcr PAYONE Trustly sind nicht korrekt.","applePay":"Die API-Zugangsdaten f\xfcr PAYONE Apple Pay sind nicht korrekt.","bancontact":"Die API-Zugangsdaten f\xfcr PAYONE Bancontact sind nicht korrekt.","ratepayDebit":"Die API-Zugangsdaten f\xfcr PAYONE Ratepay Lastschrift sind nicht korrekt.","ratepayInstallment":"Die API-Zugangsdaten f\xfcr PAYONE Ratepay Ratenzahlung sind nicht korrekt.","ratepayInvoicing":"Die API-Zugangsdaten f\xfcr PAYONE Ratepay Rechnungskauf sind nicht korrekt.","klarnaInvoice":"Die API-Zugangsdaten f\xfcr PAYONE Klarna Rechnung sind nicht korrekt.","klarnaDirectDebit":"Die API-Zugangsdaten f\xfcr PAYONE Klarna Sofort bezahlen sind nicht korrekt.","klarnaInstallment":"Die API-Zugangsdaten f\xfcr PAYONE Klarna Ratenkauf sind nicht korrekt.","przelewy24":"Die API-Zugangsdaten f\xfcr PAYONE Przelewy24 sind nicht korrekt.","weChatPay":"Die API-Zugangsdaten f\xfcr PAYONE WeChat Pay sind nicht korrekt.","postfinanceCard":"Die API-Zugangsdaten f\xfcr PAYONE Postfinance (Card) sind nicht korrekt.","postfinanceWallet":"Die API-Zugangsdaten f\xfcr PAYONE Postfinance (Wallet) sind nicht korrekt.","alipay":"Die API-Zugangsdaten f\xfcr PAYONE Alipay sind nicht korrekt.","securedInvoice":"Die API-Zugangsdaten f\xfcr PAYONE Gesicherter Rechnungskauf sind nicht korrekt.","securedInstallment":"Die API-Zugangsdaten f\xfcr PAYONE Gesicherter Ratenkauf sind nicht korrekt.","securedDirectDebit":"Die API-Zugangsdaten f\xfcr PAYONE Gesicherte Lastschrift sind nicht korrekt.","amazonPay":"Die API-Zugangsdaten f\xfcr PAYONE Amazon Pay sind nicht korrekt.","amazonPayExpress":"Die API-Zugangsdaten f\xfcr PAYONE Amazon Pay sind nicht korrekt."}},"supportModal":{"menuButton":"Support","title":"Wie k\xf6nnen wir Ihnen helfen?","documentation":{"description":"Lesen Sie unsere Online-Dokumentation","button":"Dokumentation"},"support":{"description":"Kontaktieren Sie unseren Support","button":"Technischer Support"},"repository":{"description":"Melden Sie Fehler und Verbesserungen","button":"GitHub"},"testdata":{"description":"Erstellen Sie hier Ihre pers\xf6nlichen Testdaten","button":"Testdaten"}},"applePay":{"cert":{"notification":"F\xfcr die Nutzung von ApplePay ist ein Zertifikat/Key-Paar zur Authentifizierung des Merchants erforderlich. Die Anlage eines solchen Zertifikats wird hier beschrieben:
\\n https://docs.payone.com/display/public/PLATFORM/Special+Remarks+-+Apple+Pay#SpecialRemarks-ApplePay-Onboarding

\\n\\n Erstellen Sie im Anschluss unter Verwendung des folgenden Befehls eine PEM-Datei des Zertifikates:
\\n
openssl x509 -inform der -in merchant_id.cer -out merchant_id.pem

\\n Hinterlegen Sie das Zertifikat (merchant_id.pem) und den Key (merchant_id.key) in folgendem Verzeichnis:
\\n
%shopwareRoot%/config/apple-pay-cert
"}},"transitionActionNames":{"cancel":"Stornieren","complete":"Abschlie\xdfen","pay":"Bezahlen","pay_partially":"Teilweise bezahlen","process":"Durchf\xfchren","refund":"R\xfcckerstatten","refund_partially":"Teilweise r\xfcckerstatten","remind":"Erinnern","reopen":"Wieder \xf6ffnen","retour":"Retoure","retour_partially":"Teilweise retounieren","ship":"Versenden","ship_partially":"Teilweise versenden"},"messageNotBlank":"Dieser Wert darf nicht leer sein.","error":{"transaction":{"notFound":"Es wurde keine passende Transaktion gefundend","orderNotFound":"Es wurde keine passende Bestellung gefundend"}}},"sw-privileges":{"additional_permissions":{"Payone":{"label":"PAYONE","payone_order_management":"Transaktionsmanagement","payone_configuration":"Konfiguration","payone_webhook_forward":"Webhook Weiterleitung Verwaltung","payone_webhook_resend":"Webhook Weiterleitung erneut senden"}}}}'),d=JSON.parse('{"payone-payment":{"title":"PAYONE","general":{"mainMenuItemGeneral":"PAYONE","descriptionTextModule":"Settings for PAYONE","headlines":{"ratepayProfiles":"Profile","ratepayProfileConfigurations":"Profile configuration"},"label":{"shopId":"Shop-ID","currency":"Currency","error":"Status","invoiceCountry":"Invoice Country","shippingCountry":"Shipping Country","minBasket":"Min. Basket","maxBasket":"Max. Basket","reloadConfigInfo":"Profile-Configuration got automatically updated during saving the plugin configuration"},"actions":{"addShop":"Add Shop-ID"},"errors":{"existingShopId":"The entered shop-id already exists.","emptyInputs":"Please fill all input fields."}},"settingsForm":{"save":"Save","test":"Test API Credentials","titleSuccess":"Success","titleError":"Error","labelShowSpecificStatusMapping":"Display state mapping configuration","helpTextShowSpecificStatusMapping":"If not configured the general status mapping config will be applied.","messageSaveError":{"ratepayProfilesUpdateFailed":"At least one Ratepay profile could not be saved successfully, please check your configuration."},"messageTestSuccess":"The API credentials were verified successfully.","messageTestNoTestedPayments":"No payment methods were tested during the check because none of the PAYONE payment methods are activated. Please activate at least one PAYONE payment method under Settings --> Shop --> Payment.","messageTestError":{"general":"The API credentials could not be verified successfully.","creditCard":"The API credentials for PAYONE Credit Card are not valid.","prepayment":"The API credentials for PAYONE Prepayment are not valid.","debit":"The API credentials for PAYONE Direct Debit are not valid.","paypalExpress":"The API credentials for PAYONE PayPal Express are not valid.","paypal":"The API credentials for PAYONE PayPal are not valid.","payolutionInstallment":"The API credentials for PAYONE Unzer Ratenkauf are not valid.","payolutionInvoicing":"The API credentials for PAYONE Unzer Rechnungskauf are not valid.","payolutionDebit":"The API credentials for PAYONE Unzer Lastschrift are not valid.","sofort":"The API credentials for PAYONE Sofort are not valid.","eps":"The API credentials for PAYONE eps are not valid.","iDeal":"The API credentials for PAYONE iDEAL are not valid.","secureInvoice":"The API credentials for PAYONE Secure Invoice are not valid.","openInvoice":"The API credentials for PAYONE Invoice are not valid.","paydirekt":"The API credentials for PAYONE paydirekt are not valid.","trustly":"The API credentials for PAYONE Trustly are not valid.","applePay":"The API credentials for PAYONE Apple Pay are not valid.","bancontact":"The API credentials for PAYONE Bancontact payment are not valid.","ratepayDebit":"The API credentials for PAYONE Ratepay Direct Debit payment are not valid.","ratepayInstallment":"The API credentials for PAYONE Ratepay Installments payment are not valid.","ratepayInvoicing":"The API credentials for PAYONE Ratepay Open Invoice payment are not valid.","klarnaInvoice":"The API credentials for PAYONE Klarna Rechnung are not valid.","klarnaDirectDebit":"The API credentials for PAYONE Klarna Sofort bezahlen are not valid.","klarnaInstallment":"The API credentials for PAYONE Klarna Ratenkauf are not valid.","przelewy24":"The API credentials for PAYONE Przelewy24 are not valid.","weChatPay":"The API credentials for PAYONE WeChat Pay are not valid.","postfinanceCard":"The API credentials for PAYONE Postfinance (Card) are not valid.","postfinanceWallet":"The API credentials for PAYONE Postfinance (Wallet) are not valid.","alipay":"The API credentials for PAYONE Alipay are not valid.","securedInvoice":"The API credentials for PAYONE Secured Invoice are not valid.","securedInstallment":"The API credentials for PAYONE Secured Installment are not valid.","securedDirectDebit":"The API credentials for PAYONE Secured Direct Debit are not valid.","amazonPay":"The API credentials for PAYONE Amazon pay are not valid.","amazonPayExpress":"The API credentials for PAYONE Amazon pay are not valid."}},"supportModal":{"menuButton":"Support","title":"How Can We Help You?","documentation":{"description":"Read our online manual","button":"Online Manual"},"support":{"description":"Contact our technical support","button":"Tech Support"},"repository":{"description":"Report errors on GitHub","button":"GitHub"},"testdata":{"description":"Create your personal test data here","button":"Test Data"}},"applePay":{"cert":{"notification":"The ApplePay merchant authentication requires a certificate/key-pair. Further information:
\\n https://docs.payone.com/display/public/PLATFORM/Special+Remarks+-+Apple+Pay#SpecialRemarks-ApplePay-Onboarding

\\n\\n Create a pem-File afterwards by using the following command:
\\n
openssl x509 -inform der -in merchant_id.cer -out merchant_id.pem

\\n Copy certificate (merchant_id.pem) and key (merchant_id.key) file into the following folder:
\\n
%shopwareRoot%/config/apple-pay-cert
"}},"transitionActionNames":{"cancel":"Cancel","complete":"Complete","pay":"Pay","pay_partially":"Pay partially","process":"Process","refund":"Refund","refund_partially":"Refund partially","remind":"Remind","reopen":"Reopen","retour":"Retour","retour_partially":"Retour partially","ship":"Ship","ship_partially":"Ship partially"},"messageNotBlank":"This field must not be empty.","error":{"transaction":{"notFound":"No matching transaction could be found","orderNotFound":"No matching order could be found"}}},"sw-privileges":{"additional_permissions":{"Payone":{"label":"PAYONE","payone_order_management":"Transaction management","payone_configuration":"Configuration","payone_webhook_forward":"Manage webhook forwards","payone_webhook_resend":"Allow Webhook forward resend"}}}}'),g(914),g(38),Shopware.Component.register("payone-payment-plugin-icon",()=>g.e(711).then(g.bind(g,711))),Shopware.Component.register("payone-ratepay-profile-configurations",()=>g.e(942).then(g.bind(g,942))),Shopware.Component.register("payone-ratepay-profiles",()=>g.e(907).then(g.bind(g,907))),Shopware.Component.register("payone-settings",()=>g.e(811).then(g.bind(g,811))),Shopware.Module.register("payone-payment",{type:"plugin",name:"PayonePayment",title:"payone-payment.general.mainMenuItemGeneral",description:"payone-payment.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",icon:"regular-cog",snippets:{"de-DE":l,"en-GB":d},routeMiddleware(e,t){e(t)},routes:{index:{component:"payone-settings",path:"index",meta:{parentPath:"sw.settings.index",privilege:"payone:configuration"}}},settingsItem:[{name:"payone-payment",to:"payone.payment.index",label:"payone-payment.general.mainMenuItemGeneral",group:"plugins",iconComponent:"payone-payment-plugin-icon",backgroundEnabled:!1,privilege:"payone:configuration"}]}),p=JSON.parse('{"payonePayment":{"notificationTarget":{"module":{"title":"Payone Notificationweiterleitungen","buttonTitle":"Notifications"},"list":{"title":"Notificationweiterleitungen","empty":"Keine Eintr\xe4ge","buttonCreate":"Weiterleitungsziel anlegen"},"detail":{"headline":"Notificationweiterleitung","placeholder":{"url":"Url","username":"Benutzer","password":"Passwort"},"label":{"url":"Url","isBasicAuth":"Basic Auth","txactions":"txactions","buttonSave":"Speichern","buttonCancel":"Abbrechen","username":"Benutzer","password":"Passwort"}},"columns":{"url":"Url","isBasicAuth":"Basic Auth","txactions":"txactions"},"actions":{"requeue":"Erneut senden"},"messages":{"success":"Die Weiterleitung wurde erfolgreich in Auftrag gegeben."}}}}'),c=JSON.parse('{"payonePayment":{"notificationTarget":{"module":{"title":"Payone notification forward","buttonTitle":"Notifications"},"list":{"title":"Notification forward","empty":"No entries","buttonCreate":"Add new notification target"},"detail":{"headline":"Notification forward","placeholder":{"url":"Url","username":"Username","password":"Password"},"label":{"url":"Url","isBasicAuth":"Basic Auth","txactions":"txactions","buttonSave":"Save","buttonCancel":"Cancel","username":"Username","password":"Password"}},"columns":{"url":"Url","isBasicAuth":"Basic Auth","txactions":"txactions"},"actions":{"requeue":"Requeue"},"messages":{"success":"The notification forward has been successfully queued."}}}}'),Shopware.Component.register("payone-notification-target-detail",g.e(301).then(g.bind(g,301))),Shopware.Component.register("payone-notification-target-list",g.e(355).then(g.bind(g,355))),Shopware.Module.register("payone-notification-target",{type:"plugin",name:"PayoneNotificationTarget",title:"payonePayment.notificationTarget.module.title",description:"payonePayment.notificationTarget.module.title",icon:"regular-cog",snippets:{"de-DE":p,"en-GB":c},routes:{list:{component:"payone-notification-target-list",path:"list",meta:{privilege:"payone_payment_notification_target:read"}},detail:{component:"payone-notification-target-detail",path:"detail/:id",props:{default(e){return{notificationTargetId:e.params.id}}},meta:{parentPath:"payone.notification.target.list",privilege:"payone_payment_notification_target:read"}},create:{component:"payone-notification-target-detail",path:"create",meta:{parentPath:"payone.notification.target.list",privilege:"payone_payment_notification_target:create"}}}}),g(988),g(437),g(309),g(352)})(); \ No newline at end of file +(function(){var e,t,n,a,i,r,o,s,l,d,p,c,u={820:function(){try{Shopware.Service("privileges").addPrivilegeMappingEntry({category:"additional_permissions",parent:null,key:"Payone",roles:{payone_order_management:{privileges:["payone_order_management","payone_payment_order_transaction_data:read","payone_payment_order_transaction_data:update","payone_payment_order_action_log:read","payone_payment_order_action_log:create","payone_payment_webhook_log:read","payone_payment_notification_forward:read","payone_payment_notification_forward:create"],dependencies:[]},payone_configuration:{privileges:["system_config:read","system_config:create","system_config:update","system_config:delete","currency:read","sales_channel:read","payone:configuration"],dependencies:[]},payone_webhook_forward:{privileges:["payone_payment_notification_target:read","payone_payment_notification_target:create","payone_payment_notification_target:update","payone_payment_notification_target:delete","payone:manage_webhook_forwards"],dependencies:[]},payone_webhook_resend:{privileges:["payone_webhook_resend"],dependencies:[]}}})}catch(e){}},266:function(){let{Application:e}=Shopware,t=Shopware.Classes.ApiService;class n extends t{constructor(e,t,n="payone_payment"){super(e,t,n)}validateApiCredentials(e){let n=this.getBasicHeaders();return this.httpClient.post(`_action/${this.getApiBasePath()}/validate-api-credentials`,{credentials:e},{headers:n}).then(e=>t.handleResponse(e))}getStateMachineTransitionActions(){let e=this.getBasicHeaders();return this.httpClient.get(`_action/${this.getApiBasePath()}/get-state-machine-transition-actions`,{headers:e}).then(e=>t.handleResponse(e))}hasApplePayCert(){let e=this.getBasicHeaders();return this.httpClient.get(`_action/${this.getApiBasePath()}/check-apple-pay-cert`,{headers:e}).catch(()=>!1).then(e=>!!e)}}e.addServiceProvider("PayonePaymentSettingsService",t=>new n(e.getContainer("init").httpClient,t.loginService))},326:function(){let{Application:e}=Shopware,t=Shopware.Classes.ApiService;class n extends t{constructor(e,t,n="payone"){super(e,t,n)}requeueNotificationForward(e){let n=`_action/${this.getApiBasePath()}/requeue-forward`;return this.httpClient.post(n,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}capturePayment(e){let n=`_action/${this.getApiBasePath()}/capture-payment`;return this.httpClient.post(n,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}refundPayment(e){let n=`_action/${this.getApiBasePath()}/refund-payment`;return this.httpClient.post(n,e,{headers:this.getBasicHeaders()}).then(e=>t.handleResponse(e))}}e.addServiceProvider("PayonePaymentService",t=>new n(e.getContainer("init").httpClient,t.loginService))},598:function(){let{Component:e,Utils:t}=Shopware;e.extend("payone-payment-settings","sw-system-config",{inject:["PayonePaymentSettingsService"],methods:{_getShowPaymentStatusFieldsFieldName(e){return`PayonePayment.settings.${e}_show_status_mapping`},async readConfig(){this.stateMaschineOptions=await this.PayonePaymentSettingsService.getStateMachineTransitionActions().then(e=>e.data.map(e=>{let t=`payone-payment.transitionActionNames.${e.label}`,n=this.$t(t);return n===t&&(n=e.label),{id:e.value,name:n}})),await this.$super("readConfig"),this.config.forEach(e=>{let t=e.name.match(/^payment_(.*)$/),n=t?t[1]:null;n&&(this.addApiConfigurationFieldsToPaymentSettingCard(e,n),this.addPaymentStatusFieldsToPaymentSettingCard(e,n)),(e.name.startsWith("payment_")||"status_mapping"===e.name)&&(e.setShowFields=t=>{e.showFields=t,e.elements.forEach(e=>{e.hidden=!t}),this.showPaymentStatusFieldsBasedOnToggle(e)},e.setShowFields(!1))})},addApiConfigurationFieldsToPaymentSettingCard(e,n){let a=["merchantId","accountId","portalId","portalKey"],i=this.config.find(e=>"basic_configuration"===e.name),r=[];i.elements.forEach(e=>{let i=e.name.match(/\.([^.]+)$/),o=i?i[1]:null;if(!o||!a.includes(o))return;let s=t.object.cloneDeep(e);s.name=e.name.replace("."+o,"."+n+(o[0].toUpperCase()+o.slice(1))),s.config.helpText={"en-GB":"The basic configuration value is used, if nothing is entered here.","de-DE":"Es wird der Wert aus der Grundeinstellung verwendet, wenn hier kein Wert eingetragen ist."},r.push(s)}),e.elements=r.concat(e.elements)},addPaymentStatusFieldsToPaymentSettingCard(e,n){e.elements.push({config:{componentName:"sw-switch-field",label:{"en-GB":"Display state mapping configuration","de-DE":"Statusmappingkonfiguration einblenden"},helpText:{"en-GB":"If not configured the general status mapping config will be applied.","de-DE":"Sie k\xf6nnen f\xfcr jede Zahlungsart ein spezifisches Statusmapping konfigurieren. Existiert eine solche Konfiguration nicht, wird auf die allgemeine Konfiguration zur\xfcckgegriffen."}},name:this._getShowPaymentStatusFieldsFieldName(e.name)}),this.config.find(e=>"status_mapping"===e.name).elements.forEach(a=>{let i=t.object.cloneDeep(a);i.name=a.name.replace(".paymentStatus",`.${n}PaymentStatus`),e.elements.push(i)})},getElementBind(e,t){let n=this.$super("getElementBind",e,t);return(e.name.includes("PaymentStatus")||e.name.includes(".paymentStatus"))&&(n.config.options=this.stateMaschineOptions),n},getInheritWrapperBind(e){let t=this.$super("getInheritWrapperBind",e);return t.hidden=e.hidden,t},showPaymentStatusFieldsBasedOnToggle(e){let t=this.actualConfigData[this.currentSalesChannelId];if(!t)return;let n=t[this._getShowPaymentStatusFieldsFieldName(e.name)];e.elements.forEach(e=>{e.name.includes("PaymentStatus")&&(e.hidden=!n)})},emitConfig(){this.config.forEach(e=>this.showPaymentStatusFieldsBasedOnToggle(e)),this.$super("emitConfig")}}})},539:function(){let{Filter:e}=Shopware;e.register("payone_currency",(t,n,a)=>null===t?"-":(t/=100,e.getByName("currency")(t,n,a)))},3:function(e,t,n){Shopware.Component.register("payone-capture-button",()=>n.e(545).then(n.bind(n,545))),Shopware.Component.register("payone-order-items",()=>n.e(56).then(n.bind(n,56))),Shopware.Component.register("payone-payment-management",()=>n.e(663).then(n.bind(n,663))),Shopware.Component.register("payone-payment-order-action-log",()=>n.e(257).then(n.bind(n,257))),Shopware.Component.register("payone-payment-webhook-log",()=>n.e(38).then(n.bind(n,38))),Shopware.Component.register("payone-refund-button",()=>n.e(397).then(n.bind(n,397))),Shopware.Component.register("sw-order-detail-payone",()=>n.e(281).then(n.bind(n,281))),Shopware.Component.override("sw-order-detail",()=>n.e(370).then(n.bind(n,370))),Shopware.Module.register("sw-order-detail-tab-payone",{routeMiddleware(e,t){"sw.order.detail"===t.name&&t.children.push({name:"sw.order.detail.payone",path:"payone",component:"sw-order-detail-payone",meta:{parentPath:"sw.order.detail",meta:{parentPath:"sw.order.index",privilege:"order.viewer"}}}),e(t)}})}},h={};function g(e){var t=h[e];if(void 0!==t)return t.exports;var n=h[e]={id:e,exports:{}};return u[e](n,n.exports,g),n.exports}g.m=u,g.d=function(e,t){for(var n in t)g.o(t,n)&&!g.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},g.f={},g.e=function(e){return Promise.all(Object.keys(g.f).reduce(function(t,n){return g.f[n](e,t),t},[]))},g.u=function(e){return"static/js/"+({38:"f3325231b20f896fb153",56:"99116029fd5cc08b8b2e",193:"291b7df2453adb3b7d6c",257:"93ee53f5004b8e0953a3",281:"6a3212b4cf68600a8718",369:"de12faeb6c7c356ea640",370:"a6acacf23554885ed833",397:"ad5aef0569df8471b8a2",535:"3901ed09467826470de4",545:"d025cd2c5ea617156ce8",663:"319b3325013fab2d6905",723:"7576b08bffbdb610dab3",836:"17ed5bd529a49813a703",899:"dd4be5705e0d3a95092d"})[e]+".js"},g.miniCssF=function(e){return"static/css/"+e+".css"},g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="administration:",g.l=function(n,a,i,r){if(e[n]){e[n].push(a);return}if(void 0!==i)for(var o,s,l=document.getElementsByTagName("script"),d=0;d Shop --> Zahlungsarten.","messageTestError":{"general":"Die API-Zugangsdaten konnten nicht validiert werden.","creditCard":"Die API-Zugangsdaten f\xfcr PAYONE Kreditkarte sind nicht korrekt.","prepayment":"Die API-Zugangsdaten f\xfcr PAYONE Vorkasse sind nicht korrekt.","debit":"Die API-Zugangsdaten f\xfcr PAYONE Lastschrift sind nicht korrekt.","paypalExpress":"Die API-Zugangsdaten f\xfcr PAYONE PayPal Express sind nicht korrekt.","paypal":"Die API-Zugangsdaten f\xfcr PAYONE PayPal sind nicht korrekt.","payolutionInstallment":"Die API-Zugangsdaten f\xfcr PAYONE Unzer Ratenkauf sind nicht korrekt.","payolutionInvoicing":"Die API-Zugangsdaten f\xfcr PAYONE Unzer Rechnungskauf sind nicht korrekt.","payolutionDebit":"Die API-Zugangsdaten f\xfcr PAYONE Unzer Lastschrift sind nicht korrekt.","sofort":"Die API-Zugangsdaten f\xfcr PAYONE Sofort \xdcberweisung sind nicht korrekt.","eps":"Die API-Zugangsdaten f\xfcr PAYONE eps \xdcberweisung sind nicht korrekt.","iDeal":"Die API-Zugangsdaten f\xfcr PAYONE iDEAL sind nicht korrekt.","secureInvoice":"Die API-Zugangsdaten f\xfcr PAYONE Gesicherter Rechnungskauf sind nicht korrekt.","openInvoice":"Die API-Zugangsdaten f\xfcr PAYONE Rechnungskauf sind nicht korrekt.","paydirekt":"Die API-Zugangsdaten f\xfcr PAYONE paydirekt sind nicht korrekt.","trustly":"Die API-Zugangsdaten f\xfcr PAYONE Trustly sind nicht korrekt.","applePay":"Die API-Zugangsdaten f\xfcr PAYONE Apple Pay sind nicht korrekt.","bancontact":"Die API-Zugangsdaten f\xfcr PAYONE Bancontact sind nicht korrekt.","ratepayDebit":"Die API-Zugangsdaten f\xfcr PAYONE Ratepay Lastschrift sind nicht korrekt.","ratepayInstallment":"Die API-Zugangsdaten f\xfcr PAYONE Ratepay Ratenzahlung sind nicht korrekt.","ratepayInvoicing":"Die API-Zugangsdaten f\xfcr PAYONE Ratepay Rechnungskauf sind nicht korrekt.","klarnaInvoice":"Die API-Zugangsdaten f\xfcr PAYONE Klarna Rechnung sind nicht korrekt.","klarnaDirectDebit":"Die API-Zugangsdaten f\xfcr PAYONE Klarna Sofort bezahlen sind nicht korrekt.","klarnaInstallment":"Die API-Zugangsdaten f\xfcr PAYONE Klarna Ratenkauf sind nicht korrekt.","przelewy24":"Die API-Zugangsdaten f\xfcr PAYONE Przelewy24 sind nicht korrekt.","weChatPay":"Die API-Zugangsdaten f\xfcr PAYONE WeChat Pay sind nicht korrekt.","postfinanceCard":"Die API-Zugangsdaten f\xfcr PAYONE Postfinance (Card) sind nicht korrekt.","postfinanceWallet":"Die API-Zugangsdaten f\xfcr PAYONE Postfinance (Wallet) sind nicht korrekt.","alipay":"Die API-Zugangsdaten f\xfcr PAYONE Alipay sind nicht korrekt.","securedInvoice":"Die API-Zugangsdaten f\xfcr PAYONE Gesicherter Rechnungskauf sind nicht korrekt.","securedInstallment":"Die API-Zugangsdaten f\xfcr PAYONE Gesicherter Ratenkauf sind nicht korrekt.","securedDirectDebit":"Die API-Zugangsdaten f\xfcr PAYONE Gesicherte Lastschrift sind nicht korrekt.","amazonPay":"Die API-Zugangsdaten f\xfcr PAYONE Amazon Pay sind nicht korrekt.","amazonPayExpress":"Die API-Zugangsdaten f\xfcr PAYONE Amazon Pay sind nicht korrekt."}},"supportModal":{"menuButton":"Support","title":"Wie k\xf6nnen wir Ihnen helfen?","documentation":{"description":"Lesen Sie unsere Online-Dokumentation","button":"Dokumentation"},"support":{"description":"Kontaktieren Sie unseren Support","button":"Technischer Support"},"repository":{"description":"Melden Sie Fehler und Verbesserungen","button":"GitHub"},"testdata":{"description":"Erstellen Sie hier Ihre pers\xf6nlichen Testdaten","button":"Testdaten"}},"applePay":{"cert":{"notification":"F\xfcr die Nutzung von ApplePay ist ein Zertifikat/Key-Paar zur Authentifizierung des Merchants erforderlich. Die Anlage eines solchen Zertifikats wird hier beschrieben:
\\n https://docs.payone.com/display/public/PLATFORM/Special+Remarks+-+Apple+Pay#SpecialRemarks-ApplePay-Onboarding

\\n\\n Erstellen Sie im Anschluss unter Verwendung des folgenden Befehls eine PEM-Datei des Zertifikates:
\\n
openssl x509 -inform der -in merchant_id.cer -out merchant_id.pem

\\n Hinterlegen Sie das Zertifikat (merchant_id.pem) und den Key (merchant_id.key) in folgendem Verzeichnis:
\\n
%shopwareRoot%/config/apple-pay-cert
"}},"transitionActionNames":{"cancel":"Stornieren","complete":"Abschlie\xdfen","pay":"Bezahlen","pay_partially":"Teilweise bezahlen","process":"Durchf\xfchren","refund":"R\xfcckerstatten","refund_partially":"Teilweise r\xfcckerstatten","remind":"Erinnern","reopen":"Wieder \xf6ffnen","retour":"Retoure","retour_partially":"Teilweise retounieren","ship":"Versenden","ship_partially":"Teilweise versenden"},"messageNotBlank":"Dieser Wert darf nicht leer sein.","error":{"transaction":{"notFound":"Es wurde keine passende Transaktion gefundend","orderNotFound":"Es wurde keine passende Bestellung gefundend"}}},"sw-privileges":{"additional_permissions":{"Payone":{"label":"PAYONE","payone_order_management":"Transaktionsmanagement","payone_configuration":"Konfiguration","payone_webhook_forward":"Webhook Weiterleitung Verwaltung","payone_webhook_resend":"Webhook Weiterleitung erneut senden"}}}}'),d=JSON.parse('{"payone-payment":{"title":"PAYONE","general":{"mainMenuItemGeneral":"PAYONE","descriptionTextModule":"Settings for PAYONE","headlines":{"ratepayProfiles":"Profile","ratepayProfileConfigurations":"Profile configuration"},"label":{"shopId":"Shop-ID","currency":"Currency","error":"Status","invoiceCountry":"Invoice Country","shippingCountry":"Shipping Country","minBasket":"Min. Basket","maxBasket":"Max. Basket","reloadConfigInfo":"Profile-Configuration got automatically updated during saving the plugin configuration"},"actions":{"addShop":"Add Shop-ID"},"errors":{"existingShopId":"The entered shop-id already exists.","emptyInputs":"Please fill all input fields."}},"settingsForm":{"save":"Save","test":"Test API Credentials","titleSuccess":"Success","titleError":"Error","labelShowSpecificStatusMapping":"Display state mapping configuration","helpTextShowSpecificStatusMapping":"If not configured the general status mapping config will be applied.","messageSaveError":{"ratepayProfilesUpdateFailed":"At least one Ratepay profile could not be saved successfully, please check your configuration."},"messageTestSuccess":"The API credentials were verified successfully.","messageTestNoTestedPayments":"No payment methods were tested during the check because none of the PAYONE payment methods are activated. Please activate at least one PAYONE payment method under Settings --> Shop --> Payment.","messageTestError":{"general":"The API credentials could not be verified successfully.","creditCard":"The API credentials for PAYONE Credit Card are not valid.","prepayment":"The API credentials for PAYONE Prepayment are not valid.","debit":"The API credentials for PAYONE Direct Debit are not valid.","paypalExpress":"The API credentials for PAYONE PayPal Express are not valid.","paypal":"The API credentials for PAYONE PayPal are not valid.","payolutionInstallment":"The API credentials for PAYONE Unzer Ratenkauf are not valid.","payolutionInvoicing":"The API credentials for PAYONE Unzer Rechnungskauf are not valid.","payolutionDebit":"The API credentials for PAYONE Unzer Lastschrift are not valid.","sofort":"The API credentials for PAYONE Sofort are not valid.","eps":"The API credentials for PAYONE eps are not valid.","iDeal":"The API credentials for PAYONE iDEAL are not valid.","secureInvoice":"The API credentials for PAYONE Secure Invoice are not valid.","openInvoice":"The API credentials for PAYONE Invoice are not valid.","paydirekt":"The API credentials for PAYONE paydirekt are not valid.","trustly":"The API credentials for PAYONE Trustly are not valid.","applePay":"The API credentials for PAYONE Apple Pay are not valid.","bancontact":"The API credentials for PAYONE Bancontact payment are not valid.","ratepayDebit":"The API credentials for PAYONE Ratepay Direct Debit payment are not valid.","ratepayInstallment":"The API credentials for PAYONE Ratepay Installments payment are not valid.","ratepayInvoicing":"The API credentials for PAYONE Ratepay Open Invoice payment are not valid.","klarnaInvoice":"The API credentials for PAYONE Klarna Rechnung are not valid.","klarnaDirectDebit":"The API credentials for PAYONE Klarna Sofort bezahlen are not valid.","klarnaInstallment":"The API credentials for PAYONE Klarna Ratenkauf are not valid.","przelewy24":"The API credentials for PAYONE Przelewy24 are not valid.","weChatPay":"The API credentials for PAYONE WeChat Pay are not valid.","postfinanceCard":"The API credentials for PAYONE Postfinance (Card) are not valid.","postfinanceWallet":"The API credentials for PAYONE Postfinance (Wallet) are not valid.","alipay":"The API credentials for PAYONE Alipay are not valid.","securedInvoice":"The API credentials for PAYONE Secured Invoice are not valid.","securedInstallment":"The API credentials for PAYONE Secured Installment are not valid.","securedDirectDebit":"The API credentials for PAYONE Secured Direct Debit are not valid.","amazonPay":"The API credentials for PAYONE Amazon pay are not valid.","amazonPayExpress":"The API credentials for PAYONE Amazon pay are not valid."}},"supportModal":{"menuButton":"Support","title":"How Can We Help You?","documentation":{"description":"Read our online manual","button":"Online Manual"},"support":{"description":"Contact our technical support","button":"Tech Support"},"repository":{"description":"Report errors on GitHub","button":"GitHub"},"testdata":{"description":"Create your personal test data here","button":"Test Data"}},"applePay":{"cert":{"notification":"The ApplePay merchant authentication requires a certificate/key-pair. Further information:
\\n https://docs.payone.com/display/public/PLATFORM/Special+Remarks+-+Apple+Pay#SpecialRemarks-ApplePay-Onboarding

\\n\\n Create a pem-File afterwards by using the following command:
\\n
openssl x509 -inform der -in merchant_id.cer -out merchant_id.pem

\\n Copy certificate (merchant_id.pem) and key (merchant_id.key) file into the following folder:
\\n
%shopwareRoot%/config/apple-pay-cert
"}},"transitionActionNames":{"cancel":"Cancel","complete":"Complete","pay":"Pay","pay_partially":"Pay partially","process":"Process","refund":"Refund","refund_partially":"Refund partially","remind":"Remind","reopen":"Reopen","retour":"Retour","retour_partially":"Retour partially","ship":"Ship","ship_partially":"Ship partially"},"messageNotBlank":"This field must not be empty.","error":{"transaction":{"notFound":"No matching transaction could be found","orderNotFound":"No matching order could be found"}}},"sw-privileges":{"additional_permissions":{"Payone":{"label":"PAYONE","payone_order_management":"Transaction management","payone_configuration":"Configuration","payone_webhook_forward":"Manage webhook forwards","payone_webhook_resend":"Allow Webhook forward resend"}}}}'),g(539),g(598),Shopware.Component.register("payone-payment-plugin-icon",()=>g.e(535).then(g.bind(g,535))),Shopware.Component.register("payone-ratepay-profile-configurations",()=>g.e(723).then(g.bind(g,723))),Shopware.Component.register("payone-ratepay-profiles",()=>g.e(369).then(g.bind(g,369))),Shopware.Component.register("payone-settings",()=>g.e(899).then(g.bind(g,899))),Shopware.Module.register("payone-payment",{type:"plugin",name:"PayonePayment",title:"payone-payment.general.mainMenuItemGeneral",description:"payone-payment.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",icon:"regular-cog",snippets:{"de-DE":l,"en-GB":d},routeMiddleware(e,t){e(t)},routes:{index:{component:"payone-settings",path:"index",meta:{parentPath:"sw.settings.index",privilege:"payone:configuration"}}},settingsItem:[{name:"payone-payment",to:"payone.payment.index",label:"payone-payment.general.mainMenuItemGeneral",group:"plugins",iconComponent:"payone-payment-plugin-icon",backgroundEnabled:!1,privilege:"payone:configuration"}]}),p=JSON.parse('{"payonePayment":{"notificationTarget":{"module":{"title":"Payone Notificationweiterleitungen","buttonTitle":"Notifications"},"list":{"title":"Notificationweiterleitungen","empty":"Keine Eintr\xe4ge","buttonCreate":"Weiterleitungsziel anlegen"},"detail":{"headline":"Notificationweiterleitung","placeholder":{"url":"Url","username":"Benutzer","password":"Passwort"},"label":{"url":"Url","isBasicAuth":"Basic Auth","txactions":"txactions","buttonSave":"Speichern","buttonCancel":"Abbrechen","username":"Benutzer","password":"Passwort"}},"columns":{"url":"Url","isBasicAuth":"Basic Auth","txactions":"txactions"},"actions":{"requeue":"Erneut senden"},"messages":{"success":"Die Weiterleitung wurde erfolgreich in Auftrag gegeben."}}}}'),c=JSON.parse('{"payonePayment":{"notificationTarget":{"module":{"title":"Payone notification forward","buttonTitle":"Notifications"},"list":{"title":"Notification forward","empty":"No entries","buttonCreate":"Add new notification target"},"detail":{"headline":"Notification forward","placeholder":{"url":"Url","username":"Username","password":"Password"},"label":{"url":"Url","isBasicAuth":"Basic Auth","txactions":"txactions","buttonSave":"Save","buttonCancel":"Cancel","username":"Username","password":"Password"}},"columns":{"url":"Url","isBasicAuth":"Basic Auth","txactions":"txactions"},"actions":{"requeue":"Requeue"},"messages":{"success":"The notification forward has been successfully queued."}}}}'),Shopware.Component.register("payone-notification-target-detail",g.e(193).then(g.bind(g,193))),Shopware.Component.register("payone-notification-target-list",g.e(836).then(g.bind(g,836))),Shopware.Module.register("payone-notification-target",{type:"plugin",name:"PayoneNotificationTarget",title:"payonePayment.notificationTarget.module.title",description:"payonePayment.notificationTarget.module.title",icon:"regular-cog",snippets:{"de-DE":p,"en-GB":c},routes:{list:{component:"payone-notification-target-list",path:"list",meta:{privilege:"payone_payment_notification_target:read"}},detail:{component:"payone-notification-target-detail",path:"detail/:id",props:{default(e){return{notificationTargetId:e.params.id}}},meta:{parentPath:"payone.notification.target.list",privilege:"payone_payment_notification_target:read"}},create:{component:"payone-notification-target-detail",path:"create",meta:{parentPath:"payone.notification.target.list",privilege:"payone_payment_notification_target:create"}}}}),g(3),g(326),g(266),g(820)})(); \ No newline at end of file diff --git a/src/Resources/public/static/css/907.css b/src/Resources/public/static/css/369.css similarity index 100% rename from src/Resources/public/static/css/907.css rename to src/Resources/public/static/css/369.css diff --git a/src/Resources/public/static/css/992.css b/src/Resources/public/static/css/397.css similarity index 100% rename from src/Resources/public/static/css/992.css rename to src/Resources/public/static/css/397.css diff --git a/src/Resources/public/static/css/711.css b/src/Resources/public/static/css/535.css similarity index 100% rename from src/Resources/public/static/css/711.css rename to src/Resources/public/static/css/535.css diff --git a/src/Resources/public/static/css/279.css b/src/Resources/public/static/css/545.css similarity index 100% rename from src/Resources/public/static/css/279.css rename to src/Resources/public/static/css/545.css diff --git a/src/Resources/public/static/css/170.css b/src/Resources/public/static/css/56.css similarity index 100% rename from src/Resources/public/static/css/170.css rename to src/Resources/public/static/css/56.css diff --git a/src/Resources/public/static/css/651.css b/src/Resources/public/static/css/663.css similarity index 100% rename from src/Resources/public/static/css/651.css rename to src/Resources/public/static/css/663.css diff --git a/src/Resources/public/static/css/942.css b/src/Resources/public/static/css/723.css similarity index 100% rename from src/Resources/public/static/css/942.css rename to src/Resources/public/static/css/723.css diff --git a/src/Resources/public/static/css/811.css b/src/Resources/public/static/css/899.css similarity index 100% rename from src/Resources/public/static/css/811.css rename to src/Resources/public/static/css/899.css diff --git a/src/Resources/public/static/js/6a970e386e8781e26969.js b/src/Resources/public/static/js/17ed5bd529a49813a703.js similarity index 99% rename from src/Resources/public/static/js/6a970e386e8781e26969.js rename to src/Resources/public/static/js/17ed5bd529a49813a703.js index 89e8ec6e..a7113aed 100644 --- a/src/Resources/public/static/js/6a970e386e8781e26969.js +++ b/src/Resources/public/static/js/17ed5bd529a49813a703.js @@ -1 +1 @@ -"use strict";(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[355],{355:function(t,n,e){e.r(n),e.d(n,{default:function(){return o}});let{Mixin:i,Data:{Criteria:a}}=Shopware;var o={template:'{% block payone_notification_target_list %}\n \n\n {% block payone_notification_target_list_smart_bar_header %}\n \n {% endblock %}\n\n {% block payone_notification_target_list_actions %}\n \n {% endblock %}\n\n {% block payone_notification_target_list_content %}\n \n {% endblock %}\n\n {% block payone_notification_target_list_sidebar %}\n \n {% endblock %}\n \n{% endblock %}\n',inject:["repositoryFactory","acl"],mixins:[i.getByName("listing")],data(){return{isLoading:!1,items:null,sortBy:"createdAt",criteriaLimit:500,criteriaPage:1,limit:500}},metaInfo(){return{title:this.$createTitle()}},computed:{notificationTargetColumns(){return[{dataIndex:"url",property:"url",label:"payonePayment.notificationTarget.columns.url",primary:!0},{dataIndex:"isBasicAuth",property:"isBasicAuth",label:"payonePayment.notificationTarget.columns.isBasicAuth"},{property:"txactions",label:"payonePayment.notificationTarget.columns.txactions"}]},repository(){return this.repositoryFactory.create("payone_payment_notification_target")},criteria(){return new a(this.criteriaPage,this.criteriaLimit)}},created(){this.createdComponent()},methods:{renderTxactions(t){return null!==t&&t.length?t.join(", "):""},createdComponent(){this.getList()},getList(){this.isLoading=!0;let t={...Shopware.Context.api,inheritance:!0};return this.repository.search(this.criteria,t).then(t=>{this.total=t.total,this.items=t,this.isLoading=!1})},onDelete(t){this.$refs.listing.deleteItem(t),this.getList()}}}}}]); \ No newline at end of file +"use strict";(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[836],{836:function(t,n,e){e.r(n),e.d(n,{default:function(){return o}});let{Mixin:i,Data:{Criteria:a}}=Shopware;var o={template:'{% block payone_notification_target_list %}\n \n\n {% block payone_notification_target_list_smart_bar_header %}\n \n {% endblock %}\n\n {% block payone_notification_target_list_actions %}\n \n {% endblock %}\n\n {% block payone_notification_target_list_content %}\n \n {% endblock %}\n\n {% block payone_notification_target_list_sidebar %}\n \n {% endblock %}\n \n{% endblock %}\n',inject:["repositoryFactory","acl"],mixins:[i.getByName("listing")],data(){return{isLoading:!1,items:null,sortBy:"createdAt",criteriaLimit:500,criteriaPage:1,limit:500}},metaInfo(){return{title:this.$createTitle()}},computed:{notificationTargetColumns(){return[{dataIndex:"url",property:"url",label:"payonePayment.notificationTarget.columns.url",primary:!0},{dataIndex:"isBasicAuth",property:"isBasicAuth",label:"payonePayment.notificationTarget.columns.isBasicAuth"},{property:"txactions",label:"payonePayment.notificationTarget.columns.txactions"}]},repository(){return this.repositoryFactory.create("payone_payment_notification_target")},criteria(){return new a(this.criteriaPage,this.criteriaLimit)}},created(){this.createdComponent()},methods:{renderTxactions(t){return null!==t&&t.length?t.join(", "):""},createdComponent(){this.getList()},getList(){this.isLoading=!0;let t={...Shopware.Context.api,inheritance:!0};return this.repository.search(this.criteria,t).then(t=>{this.total=t.total,this.items=t,this.isLoading=!1})},onDelete(t){this.$refs.listing.deleteItem(t),this.getList()}}}}}]); \ No newline at end of file diff --git a/src/Resources/public/static/js/0fa124d6fc506ed9d101.js b/src/Resources/public/static/js/291b7df2453adb3b7d6c.js similarity index 99% rename from src/Resources/public/static/js/0fa124d6fc506ed9d101.js rename to src/Resources/public/static/js/291b7df2453adb3b7d6c.js index cefe2eee..d5fbb25f 100644 --- a/src/Resources/public/static/js/0fa124d6fc506ed9d101.js +++ b/src/Resources/public/static/js/291b7df2453adb3b7d6c.js @@ -1 +1 @@ -"use strict";(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[301],{301:function(t,n,e){e.r(n),e.d(n,{default:function(){return i}});let{Mixin:a}=Shopware;var i={template:'{% block payone_notification_target_detail %}\n \n\n {% block payone_notification_target_detail_header %}\n \n {% endblock %}\n\n {% block payone_notification_target_detail_actions %}\n \n {% endblock %}\n\n \n\n \n{% endblock %}\n',inject:["repositoryFactory"],mixins:[a.getByName("notification")],shortcuts:{"SYSTEMKEY+S":"onSave",ESCAPE:"onCancel"},props:{notificationTargetId:{type:String,required:!1,default:null}},data(){return{notificationTarget:null,isLoading:!1,isSaveSuccessful:!1,processSuccess:!1}},metaInfo(){return{title:this.$createTitle(this.identifier)}},computed:{notificationTargetIsLoading(){return this.isLoading||null==this.notificationTarget},notificationTargetRepository(){return this.repositoryFactory.create("payone_payment_notification_target")}},watch:{notificationTargetId(){this.createdComponent()}},created(){this.createdComponent()},methods:{createdComponent(){if(this.notificationTargetId){this.loadEntityData();return}Shopware.State.commit("context/resetLanguageToDefault"),this.notificationTarget=this.notificationTargetRepository.create(Shopware.Context.api)},loadEntityData(){this.isLoading=!0,this.notificationTargetRepository.get(this.notificationTargetId,Shopware.Context.api).then(t=>{this.isLoading=!1,this.notificationTarget=t,null!==t.txactions&&(t.txactions.length||(this.notificationTarget.txactions=null))})},isInvalid(){return!0===this.notificationTarget.isBasicAuth&&(!this.notificationTarget.username||!this.notificationTarget.password)&&(this.createNotificationError({message:this.$tc("global.notification.notificationSaveErrorMessageRequiredFieldsInvalid")}),!0)},onSave(){this.isInvalid()||(this.isLoading=!0,this.notificationTargetRepository.save(this.notificationTarget,Shopware.Context.api).then(()=>{if(this.isLoading=!1,this.isSaveSuccessful=!0,null===this.notificationTargetId){this.$router.push({name:"payone.notification.target.detail",params:{id:this.notificationTarget.id}});return}this.loadEntityData()}).catch(t=>{throw this.isLoading=!1,this.createNotificationError({message:this.$tc("global.notification.notificationSaveErrorMessageRequiredFieldsInvalid")}),t}))},onCancel(){this.$router.push({name:"payone.notification.target.list"})}}}}}]); \ No newline at end of file +"use strict";(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[193],{193:function(t,n,e){e.r(n),e.d(n,{default:function(){return i}});let{Mixin:a}=Shopware;var i={template:'{% block payone_notification_target_detail %}\n \n\n {% block payone_notification_target_detail_header %}\n \n {% endblock %}\n\n {% block payone_notification_target_detail_actions %}\n \n {% endblock %}\n\n \n\n \n{% endblock %}\n',inject:["repositoryFactory"],mixins:[a.getByName("notification")],shortcuts:{"SYSTEMKEY+S":"onSave",ESCAPE:"onCancel"},props:{notificationTargetId:{type:String,required:!1,default:null}},data(){return{notificationTarget:null,isLoading:!1,isSaveSuccessful:!1,processSuccess:!1}},metaInfo(){return{title:this.$createTitle(this.identifier)}},computed:{notificationTargetIsLoading(){return this.isLoading||null==this.notificationTarget},notificationTargetRepository(){return this.repositoryFactory.create("payone_payment_notification_target")}},watch:{notificationTargetId(){this.createdComponent()}},created(){this.createdComponent()},methods:{createdComponent(){if(this.notificationTargetId){this.loadEntityData();return}Shopware.State.commit("context/resetLanguageToDefault"),this.notificationTarget=this.notificationTargetRepository.create(Shopware.Context.api)},loadEntityData(){this.isLoading=!0,this.notificationTargetRepository.get(this.notificationTargetId,Shopware.Context.api).then(t=>{this.isLoading=!1,this.notificationTarget=t,null!==t.txactions&&(t.txactions.length||(this.notificationTarget.txactions=null))})},isInvalid(){return!0===this.notificationTarget.isBasicAuth&&(!this.notificationTarget.username||!this.notificationTarget.password)&&(this.createNotificationError({message:this.$tc("global.notification.notificationSaveErrorMessageRequiredFieldsInvalid")}),!0)},onSave(){this.isInvalid()||(this.isLoading=!0,this.notificationTargetRepository.save(this.notificationTarget,Shopware.Context.api).then(()=>{if(this.isLoading=!1,this.isSaveSuccessful=!0,null===this.notificationTargetId){this.$router.push({name:"payone.notification.target.detail",params:{id:this.notificationTarget.id}});return}this.loadEntityData()}).catch(t=>{throw this.isLoading=!1,this.createNotificationError({message:this.$tc("global.notification.notificationSaveErrorMessageRequiredFieldsInvalid")}),t}))},onCancel(){this.$router.push({name:"payone.notification.target.list"})}}}}}]); \ No newline at end of file diff --git a/src/Resources/public/static/js/319b3325013fab2d6905.js b/src/Resources/public/static/js/319b3325013fab2d6905.js new file mode 100644 index 00000000..ff2b9d16 --- /dev/null +++ b/src/Resources/public/static/js/319b3325013fab2d6905.js @@ -0,0 +1 @@ +(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[663],{608:function(){},663:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}}),n(99);let{Mixin:a,Filter:r}=Shopware,{Criteria:o}=Shopware.Data;var i={template:'{% block payone_payment_management %}\n
\n \n
\n{% endblock %}\n',inject:["acl","PayonePaymentService","repositoryFactory"],mixins:[a.getByName("notification")],props:{order:{type:Object,required:!0}},data(){return{notificationForwards:null}},computed:{dateFilter(){return r.getByName("date")},payoneTransactions:function(){return this.order.transactions.filter(e=>this.isPayoneTransaction(e)).sort((e,t)=>e.createdAtt.createdAt?-1:0)},notificationForwardRepository(){return this.repositoryFactory.create("payone_payment_notification_forward")},notificationTargetColumns(){return[{property:"txaction",type:"text",width:"100px"},{property:"notificationTarget.url",type:"text"},{property:"response",width:"100px"},{property:"updatedAt",align:"right",type:"date"}]}},methods:{isPayoneTransaction(e){return!!e.extensions&&!!e.extensions.payonePaymentOrderTransactionData&&!!e.extensions.payonePaymentOrderTransactionData.transactionId&&e.extensions.payonePaymentOrderTransactionData.transactionId},isActiveTransaction(e){return"cancelled"!==e.stateMachineState.technicalName},hasNotificationForwards(e){return null===this.notificationForwards?(this.getNotificationForwards(e),!1):this.notificationForwards.length>0},getNotificationForwards(e){let t=new o;return t.addAssociation("notificationTarget"),t.addSorting(o.sort("updatedAt","DESC",!0)),t.addFilter(o.equals("transactionId",e.id)),t.setLimit(500),this.notificationForwardRepository.search(t,Shopware.Context.api).then(e=>{this.notificationForwards=e})},requeue(e,t){let n={notificationForwardId:e.id};this.PayonePaymentService.requeueNotificationForward(n).then(()=>{this.createNotificationSuccess({title:this.$tc("payonePayment.notificationTarget.actions.requeue"),message:this.$tc("payonePayment.notificationTarget.messages.success")}),this.getNotificationForwards(t)}).catch(e=>{this.createNotificationError({title:this.$tc("payonePayment.notificationTarget.actions.requeue"),message:e.message})}).finally(()=>{this.$nextTick().then(()=>{this.$emit("reload")})})},reloadEntityData(){this.$emit("reload-entity-data")},getPayoneCardType(e){let t=e.extensions.payonePaymentOrderTransactionData?.additionalData?.card_type;return t?this.$tc("sw-order.payone-payment.creditCard.cardTypes."+t):null}}}},99:function(e,t,n){var a=n(608);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),n(346).Z("b1cf68b0",a,!0,{})},346:function(e,t,n){"use strict";function a(e,t){for(var n=[],a={},r=0;rn.parts.length&&(a.parts.length=n.parts.length)}else{for(var i=[],r=0;r\n{% endblock %}\n',computed:{assetFilter(){return Shopware.Filter.getByName("asset")}}}},721:function(e,t,n){var r=n(638);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),n(346).Z("de53dba0",r,!0,{})},346:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;an.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],a=0;a\n{% endblock %}\n',computed:{assetFilter(){return Shopware.Filter.getByName("asset")}}}},269:function(e,t,n){var r=n(304);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),n(346).Z("99f588e0",r,!0,{})},346:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;an.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],a=0;a\n \n \n {{ $tc(\'sw-order.payone-payment.capture.buttonTitle\') }}\n \n \n\n \n \n\n
\n \n \n \n \n \n \n
\n\n \n
\n \n{% endblock %}\n',mixins:[i.getByName("notification")],inject:["PayonePaymentService"],props:{order:{type:Object,required:!0},transaction:{type:Object,required:!0}},data(){return{isLoading:!1,hasError:!1,showCaptureModal:!1,isCaptureSuccessful:!1,captureAmount:0,includeShippingCosts:!1,items:[]}},computed:{currencyFilter(){return r.getByName("currency")},payoneCurrencyFilter(){return r.getByName("payone_currency")},orderTotalPrice(){return this.transaction.amount.totalPrice},decimalPrecision(){return this.order&&this.order.currency?this.order.currency.decimalPrecision?this.order.currency.decimalPrecision:this.order.currency.itemRounding?this.order.currency.itemRounding.decimals:void 0:2},capturedAmount(){return this.toFixedPrecision((this.transaction?.extensions?.payonePaymentOrderTransactionData?.capturedAmount??0)/100)},remainingAmount(){return this.toFixedPrecision(this.orderTotalPrice-this.capturedAmount)},buttonEnabled(){return!!this.transaction?.extensions?.payonePaymentOrderTransactionData&&(this.remainingAmount>0||this.transaction.extensions.payonePaymentOrderTransactionData.allowCapture)},selectedItems(){return this.items.filter(e=>e.selected&&e.quantity>0)},hasRemainingShippingCosts(){return!(this.order.shippingCosts.totalPrice<=0)&&this.toFixedPrecision(this.capturedAmount+this.order.shippingCosts.totalPrice)<=this.orderTotalPrice}},methods:{toFixedPrecision(e){return Math.round(e*10**this.decimalPrecision)/10**this.decimalPrecision},calculateActionAmount(){let e=0;this.selectedItems.forEach(t=>{e+=t.unit_price*t.quantity}),this.captureAmount=this.toFixedPrecision(e>this.remainingAmount?this.remainingAmount:e)},openCaptureModal(){this.showCaptureModal=!0,this.isCaptureSuccessful=!1,this.initItems()},initItems(){this.items=this.order.lineItems.map(e=>{let t=e.quantity-(e.customFields?.payone_captured_quantity??0);return{id:e.id,quantity:t,maxQuantity:t,unit_price:e.unitPrice,selected:!1,product:e.label,orderItem:e,disabled:t<=0}}),this.order.shippingCosts.totalPrice>0&&this.items.push({id:"shipping",quantity:1,maxQuantity:1,unit_price:this.order.shippingCosts.totalPrice,selected:!1,disabled:!1,product:this.$tc("sw-order.payone-payment.modal.shippingCosts")})},closeCaptureModal(){this.showCaptureModal=!1},onCaptureFinished(){this.isCaptureSuccessful=!1},captureOrder(){let e={orderTransactionId:this.transaction.id,payone_order_id:this.transaction.extensions.payonePaymentOrderTransactionData.transactionId,salesChannel:this.order.salesChannel,amount:this.captureAmount,orderLines:[],complete:this.captureAmount===this.remainingAmount,includeShippingCosts:!1};this.isLoading=!0,this.selectedItems.forEach(t=>{if("shipping"===t.id)e.includeShippingCosts=!0;else{let n=this.order.lineItems.find(e=>e.id===t.id);if(n){let i={...n};i.quantity=t.quantity,i.total_amount=i.unit_price*i.quantity,i.total_tax_amount=i.total_amount-i.total_amount/(1+i.tax_rate/100),e.orderLines.push(i)}}}),this.remainingAmount({id:e.id,quantity:e.quantity-(e.customFields?.payone_captured_quantity??0),unit_price:e.unitPrice,selected:!1})),this.executeCapture(e)},executeCapture(e){this.PayonePaymentService.capturePayment(e).then(()=>{this.createNotificationSuccess({title:this.$tc("sw-order.payone-payment.capture.successTitle"),message:this.$tc("sw-order.payone-payment.capture.successMessage")}),this.isCaptureSuccessful=!0}).catch(e=>{this.createNotificationError({title:this.$tc("sw-order.payone-payment.capture.errorTitle"),message:e.message}),this.isCaptureSuccessful=!1}).finally(()=>{this.isLoading=!1,this.closeCaptureModal(),this.$nextTick().then(()=>{this.$emit("reload")})})}},watch:{items:{handler(){this.calculateActionAmount()},deep:!0}}}},4:function(e,t,n){var i=n(174);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),n(346).Z("31aa70b3",i,!0,{})},346:function(e,t,n){"use strict";function i(e,t){for(var n=[],i={},r=0;rn.parts.length&&(i.parts.length=n.parts.length)}else{for(var s=[],r=0;r\n {% block sw_order_detail_payone_general %}\n \n {% endblock %}\n\n {% block sw_order_detail_payone_order_action_log %}\n \n {% endblock %}\n\n {% block sw_order_detail_payone_webhook_log %}\n \n {% endblock %}\n \n{% endblock %}\n',inject:["acl"],props:{orderId:{type:String,required:!0}},computed:{...r("swOrderDetail",["order"])},methods:{reloadEntityData(){this.$refs.payoneOrderActionLogs?.reloadActionLogs(),this.$refs.payoneWebhookLogs?.reloadWebhookLogs(),this.$emit("reload-entity-data")}}}}}]); \ No newline at end of file +"use strict";(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[281],{281:function(e,n,o){o.r(n),o.d(n,{default:function(){return t}});let{Component:a}=Shopware,{mapState:r}=a.getComponentHelper();var t={template:'{% block sw_order_detail_payone %}\n
\n {% block sw_order_detail_payone_general %}\n \n {% endblock %}\n\n {% block sw_order_detail_payone_order_action_log %}\n \n {% endblock %}\n\n {% block sw_order_detail_payone_webhook_log %}\n \n {% endblock %}\n
\n{% endblock %}\n',inject:["acl"],props:{orderId:{type:String,required:!0}},computed:{...r("swOrderDetail",["order"])},methods:{reloadEntityData(){this.$refs.payoneOrderActionLogs?.reloadActionLogs(),this.$refs.payoneWebhookLogs?.reloadWebhookLogs(),this.$emit("reload-entity-data")}}}}}]); \ No newline at end of file diff --git a/src/Resources/public/static/js/cd7aec9b5bf6efab3757.js b/src/Resources/public/static/js/7576b08bffbdb610dab3.js similarity index 95% rename from src/Resources/public/static/js/cd7aec9b5bf6efab3757.js rename to src/Resources/public/static/js/7576b08bffbdb610dab3.js index e98fe497..f22982a3 100644 --- a/src/Resources/public/static/js/cd7aec9b5bf6efab3757.js +++ b/src/Resources/public/static/js/7576b08bffbdb610dab3.js @@ -1 +1 @@ -(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[942],{709:function(){},942:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return i}}),t(823);var i={template:'{% block payone_ratepay_profile_configurations %}\n
\n \n\n \n \n \n
\n{% endblock %}\n',inject:["PayonePaymentSettingsService"],props:{value:{type:Object,required:!1,default(){return{}}},name:{type:String,required:!0}},data(){return{isLoading:!1,configuration:this.value}},created(){this.createdComponent()},destroyed(){this.destroyedComponent()},computed:{profileConfigurations(){let e=this.name,n=[];for(let t in this.configuration){let i="",a="";switch(e){case"PayonePayment.settings.ratepayDebitProfileConfigurations":i=this.configuration[t]["tx-limit-elv-min"],a=this.configuration[t]["tx-limit-elv-max"];break;case"PayonePayment.settings.ratepayInstallmentProfileConfigurations":i=this.configuration[t]["tx-limit-installment-min"],a=this.configuration[t]["tx-limit-installment-max"];break;case"PayonePayment.settings.ratepayInvoicingProfileConfigurations":i=this.configuration[t]["tx-limit-invoice-min"],a=this.configuration[t]["tx-limit-invoice-max"];break;default:return}let r={shopId:t,shopCurrency:this.configuration[t].currency,invoiceCountry:this.configuration[t]["country-code-billing"],shippingCountry:this.configuration[t]["country-code-delivery"],minBasket:i,maxBasket:a};n.push(r)}return n}},methods:{createdComponent(){this.$root.$on("payone-ratepay-profiles-update-result",this.onProfilesUpdateResult)},destroyedComponent(){this.$root.$off("payone-ratepay-profiles-update-result")},onProfilesUpdateResult(e){e.updates[this.name]&&(this.configuration=e.updates[this.name])}}}},823:function(e,n,t){var i=t(709);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),t(346).Z("55352db4",i,!0,{})},346:function(e,n,t){"use strict";function i(e,n){for(var t=[],i={},a=0;at.parts.length&&(i.parts.length=t.parts.length)}else{for(var o=[],a=0;a\n \n\n \n \n \n \n{% endblock %}\n',inject:["PayonePaymentSettingsService"],props:{value:{type:Object,required:!1,default(){return{}}},name:{type:String,required:!0}},data(){return{isLoading:!1,configuration:this.value}},created(){this.createdComponent()},destroyed(){this.destroyedComponent()},computed:{profileConfigurations(){let e=this.name,n=[];for(let t in this.configuration){let i="",a="";switch(e){case"PayonePayment.settings.ratepayDebitProfileConfigurations":i=this.configuration[t]["tx-limit-elv-min"],a=this.configuration[t]["tx-limit-elv-max"];break;case"PayonePayment.settings.ratepayInstallmentProfileConfigurations":i=this.configuration[t]["tx-limit-installment-min"],a=this.configuration[t]["tx-limit-installment-max"];break;case"PayonePayment.settings.ratepayInvoicingProfileConfigurations":i=this.configuration[t]["tx-limit-invoice-min"],a=this.configuration[t]["tx-limit-invoice-max"];break;default:return}let r={shopId:t,shopCurrency:this.configuration[t].currency,invoiceCountry:this.configuration[t]["country-code-billing"],shippingCountry:this.configuration[t]["country-code-delivery"],minBasket:i,maxBasket:a};n.push(r)}return n}},methods:{createdComponent(){this.$root.$on("payone-ratepay-profiles-update-result",this.onProfilesUpdateResult)},destroyedComponent(){this.$root.$off("payone-ratepay-profiles-update-result")},onProfilesUpdateResult(e){e.updates[this.name]&&(this.configuration=e.updates[this.name])}}}},118:function(e,n,t){var i=t(713);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),t(346).Z("3fc5698c",i,!0,{})},346:function(e,n,t){"use strict";function i(e,n){for(var t=[],i={},a=0;at.parts.length&&(i.parts.length=t.parts.length)}else{for(var o=[],a=0;a\n \n \n{% endblock %}\n',inject:["acl","PayonePaymentService","repositoryFactory"],mixins:[a.getByName("notification")],props:{order:{type:Object,required:!0}},data(){return{notificationForwards:null}},computed:{dateFilter(){return r.getByName("date")},payoneTransactions:function(){return this.order.transactions.filter(e=>this.isPayoneTransaction(e)).sort((e,t)=>e.createdAtt.createdAt?-1:0)},notificationForwardRepository(){return this.repositoryFactory.create("payone_payment_notification_forward")},notificationTargetColumns(){return[{property:"txaction",type:"text",width:"100px"},{property:"notificationTarget.url",type:"text"},{property:"response",width:"100px"},{property:"updatedAt",align:"right",type:"date"}]}},methods:{isPayoneTransaction(e){return!!e.extensions&&!!e.extensions.payonePaymentOrderTransactionData&&!!e.extensions.payonePaymentOrderTransactionData.transactionId&&e.extensions.payonePaymentOrderTransactionData.transactionId},isActiveTransaction(e){return"cancelled"!==e.stateMachineState.technicalName},hasNotificationForwards(e){return null===this.notificationForwards?(this.getNotificationForwards(e),!1):this.notificationForwards.length>0},getNotificationForwards(e){let t=new o;return t.addAssociation("notificationTarget"),t.addSorting(o.sort("updatedAt","DESC",!0)),t.addFilter(o.equals("transactionId",e.id)),t.setLimit(500),this.notificationForwardRepository.search(t,Shopware.Context.api).then(e=>{this.notificationForwards=e})},requeue(e,t){let n={notificationForwardId:e.id};this.PayonePaymentService.requeueNotificationForward(n).then(()=>{this.createNotificationSuccess({title:this.$tc("payonePayment.notificationTarget.actions.requeue"),message:this.$tc("payonePayment.notificationTarget.messages.success")}),this.getNotificationForwards(t)}).catch(e=>{this.createNotificationError({title:this.$tc("payonePayment.notificationTarget.actions.requeue"),message:e.message})}).finally(()=>{this.$nextTick().then(()=>{this.$emit("reload")})})},reloadEntityData(){this.$emit("reload-entity-data")},getPayoneCardType(e){let t=e.extensions.payonePaymentOrderTransactionData?.additionalData?.card_type;return t?this.$tc("sw-order.payone-payment.creditCard.cardTypes."+t):null}}}},544:function(e,t,n){var a=n(289);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),n(346).Z("360f7fbc",a,!0,{})},346:function(e,t,n){"use strict";function a(e,t){for(var n=[],a={},r=0;rn.parts.length&&(a.parts.length=n.parts.length)}else{for(var i=[],r=0;r\n \n \n\n \n\n \n\n \n \n\n \n \n \n \n{% endblock %}\n',inject:["repositoryFactory"],props:{order:{type:Object,required:!0}},data(){return{orderActionLogs:[],isLoading:!1,showRequestDetails:null,showResponseDetails:null}},computed:{orderActionLogRepository(){return this.repositoryFactory.create("payone_payment_order_action_log")},dateFilter(){return r.getByName("date")},currencyFilter(){return r.getByName("currency")},assetFilter(){return r.getByName("asset")},payoneCurrencyFilter(){return r.getByName("payone_currency")},orderActionLogColumns(){return[{property:"transactionId",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleTransactionId")},{property:"request",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleRequest")},{property:"response",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleResponse")},{property:"amount",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleAmount")},{property:"requestDateTime",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleRequestDateTime")}]},keyValueColumns(){return[{property:"key",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleKey")},{property:"value",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleValue")}]}},created(){this.createdComponent()},methods:{createdComponent(){this.getOrderActionLogs()},reloadActionLogs(){this.getOrderActionLogs()},getOrderActionLogs(){let e=new n;return e.addFilter(n.equals("orderId",this.order.id)),e.addSorting(n.sort("requestDateTime","ASC",!0)),this.isLoading=!0,this.orderActionLogRepository.search(e,Shopware.Context.api).then(e=>{this.orderActionLogs=e,this.isLoading=!1})},openRequest(e){this.showRequestDetails=e.requestDetails},openResponse(e){this.showResponseDetails=e.responseDetails},onCloseRequestModal(){this.showRequestDetails=null},onCloseResponseModal(){this.showResponseDetails=null},toKeyValueSource(e){let t=[];for(let o in e)t.push({key:o,value:e[o]});return t.sort((e,t)=>e.key.localeCompare(t.key)),t},downloadAsTxt(e,t,o){let n=document.createElement("a");n.href="data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,4)),n.download=`PAYONE-${t}-${o}.txt`,n.dispatchEvent(new MouseEvent("click")),n.remove()}}}}}]); \ No newline at end of file +"use strict";(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[257],{257:function(e,t,o){o.r(t),o.d(t,{default:function(){return a}});let{Criteria:n}=Shopware.Data,{Filter:r}=Shopware;var a={template:'{% block payone_payment_order_action_log %}\n \n \n \n\n \n\n \n\n \n \n\n \n \n \n \n{% endblock %}\n',inject:["repositoryFactory"],props:{order:{type:Object,required:!0}},data(){return{orderActionLogs:[],isLoading:!1,showRequestDetails:null,showResponseDetails:null}},computed:{orderActionLogRepository(){return this.repositoryFactory.create("payone_payment_order_action_log")},dateFilter(){return r.getByName("date")},currencyFilter(){return r.getByName("currency")},assetFilter(){return r.getByName("asset")},payoneCurrencyFilter(){return r.getByName("payone_currency")},orderActionLogColumns(){return[{property:"transactionId",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleTransactionId")},{property:"request",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleRequest")},{property:"response",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleResponse")},{property:"amount",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleAmount")},{property:"requestDateTime",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleRequestDateTime")}]},keyValueColumns(){return[{property:"key",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleKey")},{property:"value",label:this.$tc("sw-order.payone-payment.orderActionLog.columnTitleValue")}]}},created(){this.createdComponent()},methods:{createdComponent(){this.getOrderActionLogs()},reloadActionLogs(){this.getOrderActionLogs()},getOrderActionLogs(){let e=new n;return e.addFilter(n.equals("orderId",this.order.id)),e.addSorting(n.sort("requestDateTime","ASC",!0)),this.isLoading=!0,this.orderActionLogRepository.search(e,Shopware.Context.api).then(e=>{this.orderActionLogs=e,this.isLoading=!1})},openRequest(e){this.showRequestDetails=e.requestDetails},openResponse(e){this.showResponseDetails=e.responseDetails},onCloseRequestModal(){this.showRequestDetails=null},onCloseResponseModal(){this.showResponseDetails=null},toKeyValueSource(e){let t=[];for(let o in e)t.push({key:o,value:e[o]});return t.sort((e,t)=>e.key.localeCompare(t.key)),t},downloadAsTxt(e,t,o){let n=document.createElement("a");n.href="data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,4)),n.download=`PAYONE-${t}-${o}.txt`,n.dispatchEvent(new MouseEvent("click")),n.remove()}}}}}]); \ No newline at end of file diff --git a/src/Resources/public/static/js/99116029fd5cc08b8b2e.js b/src/Resources/public/static/js/99116029fd5cc08b8b2e.js new file mode 100644 index 00000000..623663fc --- /dev/null +++ b/src/Resources/public/static/js/99116029fd5cc08b8b2e.js @@ -0,0 +1 @@ +(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[56],{245:function(){},56:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}}),n(751);let{Filter:r}=Shopware;var a={template:'{% block payone_payment_details %}\n
\n \n \n \n\n \n \n
\n{% endblock %}\n',props:{items:{type:Array,required:!0},order:{type:Object,required:!0}},computed:{currencyFilter:()=>r.getByName("currency"),orderItemColumns(){return[{property:"product",label:this.$tc("sw-order.payone-payment.modal.columns.product"),rawData:!0},{property:"quantity",label:this.$tc("sw-order.payone-payment.modal.columns.quantity"),rawData:!0},{property:"price",label:this.$tc("sw-order.payone-payment.modal.columns.price"),rawData:!0}]}},methods:{updateSelection(e){let t=Object.keys(e);this.items.forEach(e=>{e.selected=t.includes(e.id)})}}}},751:function(e,t,n){var r=n(245);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),n(346).Z("56e5d537",r,!0,{})},346:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;an.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],a=0;a\n {% block payone_payment_header %}\n \n {% endblock %}\n\n {% block payone_payment_actions %}\n \n {% endblock %}\n\n {% block payone_payment_settings_content %}\n \n {% endblock %}\n\n{% endblock %}\n',mixins:[a.getByName("notification"),a.getByName("sw-inline-snippet")],inject:["PayonePaymentSettingsService","acl"],data(){return{isLoading:!1,isTesting:!1,isSaveSuccessful:!1,isTestSuccessful:!1,isApplePayCertConfigured:!0,isSupportModalOpen:!1,stateMachineTransitionActions:[],displayStatusMapping:{}}},created(){this.createdComponent()},metaInfo(){return{title:this.$createTitle()}},methods:{createdComponent(){this.PayonePaymentSettingsService.hasApplePayCert().then(e=>{this.isApplePayCertConfigured=e})},saveFinish(){this.isSaveSuccessful=!1},testFinish(){this.isTestSuccessful=!1},getConfigValue(e){let n=this.$refs.systemConfig.actualConfigData,t=n.null,a=this.$refs.systemConfig.currentSalesChannelId;return null===a?n.null[`PayonePayment.settings.${e}`]:n[a][`PayonePayment.settings.${e}`]||t[`PayonePayment.settings.${e}`]},getPaymentConfigValue(e,n){let t=e.charAt(0).toUpperCase()+e.slice(1);return this.getConfigValue(n+t)||this.getConfigValue(e)},onSave(){this.isSaveSuccessful=!1,this.isLoading=!0,this.$refs.systemConfig.saveAll().then(e=>{this.handleRatepayProfileUpdates(e),this.isSaveSuccessful=!0}).finally(()=>{this.isLoading=!1})},onTest(){this.isTesting=!0,this.isTestSuccessful=!1;let e={};this.$refs.systemConfig.config.forEach(n=>{let t=n.name.match(/^payment_(.+)$/),a=t?t[1]:null;a&&(e[a]={merchantId:this.getPaymentConfigValue("merchantId",a),accountId:this.getPaymentConfigValue("accountId",a),portalId:this.getPaymentConfigValue("portalId",a),portalKey:this.getPaymentConfigValue("portalKey",a)})}),this.PayonePaymentSettingsService.validateApiCredentials(e).then(e=>{let n=e.testCount,t=e.credentialsValid,a=e.errors;if(t)this.createNotificationSuccess({title:this.$tc("payone-payment.settingsForm.titleSuccess"),message:n>0?this.$tc("payone-payment.settingsForm.messageTestSuccess"):this.$tc("payone-payment.settingsForm.messageTestNoTestedPayments")}),this.isTestSuccessful=!0;else for(let e in a)if(a.hasOwnProperty(e)){this.createNotificationError({title:this.$tc("payone-payment.settingsForm.titleError"),message:this.$tc("payone-payment.settingsForm.messageTestError."+e)});let n=a[e];"string"==typeof n&&this.createNotificationError({title:this.$tc("payone-payment.settingsForm.titleError"),message:n})}}).finally(e=>{this.createNotificationError({title:this.$tc("payone-payment.settingsForm.titleError"),message:this.$tc("payone-payment.settingsForm.messageTestError.general")}),this.isTesting=!1})},handleRatepayProfileUpdates(e){let n=this.$refs.systemConfig.currentSalesChannelId;if(e.payoneRatepayProfilesUpdateResult&&e.payoneRatepayProfilesUpdateResult[n]){let t=e.payoneRatepayProfilesUpdateResult[n];this.$root.$emit("payone-ratepay-profiles-update-result",t),Array.isArray(t.errors)||this.createNotificationError({title:this.$tc("payone-payment.settingsForm.titleError"),message:this.$tc("payone-payment.settingsForm.messageSaveError.ratepayProfilesUpdateFailed")})}}}}},45:function(e,n,t){var a=t(384);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),t(346).Z("52eb804f",a,!0,{})},346:function(e,n,t){"use strict";function a(e,n){for(var t=[],a={},s=0;st.parts.length&&(a.parts.length=t.parts.length)}else{for(var o=[],s=0;s\n {{ $tc(\'sw-order.detail.payone\') }}\n \n {% endblock %}\n\n{% endblock %}\n',inject:["acl"],methods:{hasPayoneTransaction(n){let a=this,e=!1;return!!n.transactions&&(n.transactions.map(function(n){a.isPayoneTransaction(n)&&a.isActiveTransaction(n)&&(e=!0)}),e)},isPayoneTransaction(n){return!!n.extensions&&!!n.extensions.payonePaymentOrderTransactionData&&!!n.extensions.payonePaymentOrderTransactionData.transactionId&&n.extensions.payonePaymentOrderTransactionData.transactionId},isActiveTransaction(n){return"cancelled"!==n.stateMachineState.technicalName},canAccessPayoneTab(){return(this.acl.can("payone_order_management")||this.acl.can("payone_payment_order_action_log:read")||this.acl.can("payone_payment_notification_forward:read")||this.acl.can("payone_payment_webhook_log:read"))&&this.order&&this.hasPayoneTransaction(this.order)}}}}}]); \ No newline at end of file +"use strict";(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[370],{370:function(n,a,e){e.r(a),e.d(a,{default:function(){return t}});var t={template:'{% block sw_order_detail_content_tabs_extension %}\n {% parent %}\n\n {% block sw_order_detail_content_tabs_payone %}\n \n {{ $tc(\'sw-order.detail.payone\') }}\n \n {% endblock %}\n\n{% endblock %}\n',inject:["acl"],methods:{hasPayoneTransaction(n){let a=this,e=!1;return!!n.transactions&&(n.transactions.map(function(n){a.isPayoneTransaction(n)&&a.isActiveTransaction(n)&&(e=!0)}),e)},isPayoneTransaction(n){return!!n.extensions&&!!n.extensions.payonePaymentOrderTransactionData&&!!n.extensions.payonePaymentOrderTransactionData.transactionId&&n.extensions.payonePaymentOrderTransactionData.transactionId},isActiveTransaction(n){return"cancelled"!==n.stateMachineState.technicalName},canAccessPayoneTab(){return(this.acl.can("payone_order_management")||this.acl.can("payone_payment_order_action_log:read")||this.acl.can("payone_payment_notification_forward:read")||this.acl.can("payone_payment_webhook_log:read"))&&this.order&&this.hasPayoneTransaction(this.order)}}}}}]); \ No newline at end of file diff --git a/src/Resources/public/static/js/5e443eaef4878f85be20.js b/src/Resources/public/static/js/ad5aef0569df8471b8a2.js similarity index 97% rename from src/Resources/public/static/js/5e443eaef4878f85be20.js rename to src/Resources/public/static/js/ad5aef0569df8471b8a2.js index 9fc97692..e62a0c01 100644 --- a/src/Resources/public/static/js/5e443eaef4878f85be20.js +++ b/src/Resources/public/static/js/ad5aef0569df8471b8a2.js @@ -1 +1 @@ -(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[992],{807:function(){},992:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}}),n(410);let{Mixin:i,Filter:r}=Shopware;var s={template:'{% block payone_payment_payment_details %}\n
\n \n \n {{ $tc(\'sw-order.payone-payment.refund.buttonTitle\') }}\n \n \n\n \n \n\n
\n \n \n \n \n \n \n
\n\n \n
\n
\n{% endblock %}\n',mixins:[i.getByName("notification")],inject:["PayonePaymentService"],props:{order:{type:Object,required:!0},transaction:{type:Object,required:!0}},data(){return{isLoading:!1,hasError:!1,showRefundModal:!1,isRefundSuccessful:!1,refundAmount:0,includeShippingCosts:!1,items:[]}},computed:{currencyFilter(){return r.getByName("currency")},payoneCurrencyFilter(){return r.getByName("payone_currency")},orderTotalPrice(){return this.transaction.amount.totalPrice},decimalPrecision(){return this.order&&this.order.currency?this.order.currency.decimalPrecision?this.order.currency.decimalPrecision:this.order.currency.itemRounding?this.order.currency.itemRounding.decimals:void 0:2},transactionData(){return this.transaction?.extensions?.payonePaymentOrderTransactionData??{capturedAmount:0,refundedAmount:0,allowRefund:!1}},capturedAmount(){return this.toFixedPrecision((this.transaction?.extensions?.payonePaymentOrderTransactionData?.capturedAmount??0)/100)},remainingAmount(){return(this.transactionData.capturedAmount??0)-(this.transactionData.refundedAmount??0)},refundedAmount(){return this.transactionData.refundedAmount??0},buttonEnabled(){return!!this.transaction?.extensions?.payonePaymentOrderTransactionData&&(this.remainingAmount>0||this.transactionData.allowRefund)},selectedItems(){return this.items.filter(e=>e.selected&&e.quantity>0)},hasRemainingRefundableShippingCosts(){return!(this.order.shippingCosts.totalPrice<=0)&&this.toFixedPrecision(this.refundedAmount+this.order.shippingCosts.totalPrice)<=this.capturedAmount}},methods:{toFixedPrecision(e){return Math.round(e*10**this.decimalPrecision)/10**this.decimalPrecision},calculateActionAmount(){let e=0;this.selectedItems.forEach(t=>{e+=t.unit_price*t.quantity}),this.refundAmount=this.toFixedPrecision(e>this.remainingAmount?this.remainingAmount:e)},openRefundModal(){this.showRefundModal=!0,this.isRefundSuccessful=!1,this.initItems()},initItems(){this.items=this.order.lineItems.map(e=>{let t=this.getRefundableQuantityOfItem(e);return{id:e.id,quantity:t,maxQuantity:t,unit_price:e.unitPrice,selected:!1,product:e.label,orderItem:e,disabled:t<=0}}),this.order.shippingCosts.totalPrice>0&&this.items.push({id:"shipping",quantity:1,maxQuantity:1,unit_price:this.order.shippingCosts.totalPrice,selected:!1,disabled:!1,product:this.$tc("sw-order.payone-payment.modal.shippingCosts")})},closeRefundModal(){this.showRefundModal=!1},onRefundFinished(){this.isRefundSuccessful=!1},refundOrder(){let e={orderTransactionId:this.transaction.id,payone_order_id:this.transaction.extensions.payonePaymentOrderTransactionData.transactionId,salesChannel:this.order.salesChannel,amount:this.refundAmount,orderLines:[],complete:this.refundAmount===this.maxRefundAmount,includeShippingCosts:!1};this.isLoading=!0,this.selectedItems.forEach(t=>{if("shipping"===t.id)e.includeShippingCosts=!0;else{let n=this.order.lineItems.find(e=>e.id===t.id);if(n){let i={...n};i.quantity=t.quantity,i.total_amount=i.unit_price*i.quantity,i.total_tax_amount=i.total_amount-i.total_amount/(1+i.tax_rate/100),e.orderLines.push(i)}}}),this.remainingAmount({id:e.id,quantity:this.getRefundableQuantityOfItem(e),unit_price:e.unitPrice,selected:!1})),this.executeRefund(e)},executeRefund(e){this.PayonePaymentService.refundPayment(e).then(()=>{this.createNotificationSuccess({title:this.$tc("sw-order.payone-payment.refund.successTitle"),message:this.$tc("sw-order.payone-payment.refund.successMessage")}),this.isRefundSuccessful=!0}).catch(e=>{this.createNotificationError({title:this.$tc("sw-order.payone-payment.refund.errorTitle"),message:e.message}),this.isRefundSuccessful=!1}).finally(()=>{this.isLoading=!1,this.closeRefundModal(),this.$nextTick().then(()=>{this.$emit("reload")})})}},watch:{items:{handler(){this.calculateActionAmount()},deep:!0}}}},410:function(e,t,n){var i=n(807);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),n(346).Z("afa32006",i,!0,{})},346:function(e,t,n){"use strict";function i(e,t){for(var n=[],i={},r=0;rn.parts.length&&(i.parts.length=n.parts.length)}else{for(var a=[],r=0;r\n \n \n {{ $tc(\'sw-order.payone-payment.refund.buttonTitle\') }}\n \n \n\n \n \n\n
\n \n \n \n \n \n \n
\n\n \n
\n \n{% endblock %}\n',mixins:[i.getByName("notification")],inject:["PayonePaymentService"],props:{order:{type:Object,required:!0},transaction:{type:Object,required:!0}},data(){return{isLoading:!1,hasError:!1,showRefundModal:!1,isRefundSuccessful:!1,refundAmount:0,includeShippingCosts:!1,items:[]}},computed:{currencyFilter(){return r.getByName("currency")},payoneCurrencyFilter(){return r.getByName("payone_currency")},orderTotalPrice(){return this.transaction.amount.totalPrice},decimalPrecision(){return this.order&&this.order.currency?this.order.currency.decimalPrecision?this.order.currency.decimalPrecision:this.order.currency.itemRounding?this.order.currency.itemRounding.decimals:void 0:2},transactionData(){return this.transaction?.extensions?.payonePaymentOrderTransactionData??{capturedAmount:0,refundedAmount:0,allowRefund:!1}},capturedAmount(){return this.toFixedPrecision((this.transaction?.extensions?.payonePaymentOrderTransactionData?.capturedAmount??0)/100)},remainingAmount(){return(this.transactionData.capturedAmount??0)-(this.transactionData.refundedAmount??0)},refundedAmount(){return this.transactionData.refundedAmount??0},buttonEnabled(){return!!this.transaction?.extensions?.payonePaymentOrderTransactionData&&(this.remainingAmount>0||this.transactionData.allowRefund)},selectedItems(){return this.items.filter(e=>e.selected&&e.quantity>0)},hasRemainingRefundableShippingCosts(){return!(this.order.shippingCosts.totalPrice<=0)&&this.toFixedPrecision(this.refundedAmount+this.order.shippingCosts.totalPrice)<=this.capturedAmount}},methods:{toFixedPrecision(e){return Math.round(e*10**this.decimalPrecision)/10**this.decimalPrecision},calculateActionAmount(){let e=0;this.selectedItems.forEach(t=>{e+=t.unit_price*t.quantity}),this.refundAmount=this.toFixedPrecision(e>this.remainingAmount?this.remainingAmount:e)},openRefundModal(){this.showRefundModal=!0,this.isRefundSuccessful=!1,this.initItems()},initItems(){this.items=this.order.lineItems.map(e=>{let t=this.getRefundableQuantityOfItem(e);return{id:e.id,quantity:t,maxQuantity:t,unit_price:e.unitPrice,selected:!1,product:e.label,orderItem:e,disabled:t<=0}}),this.order.shippingCosts.totalPrice>0&&this.items.push({id:"shipping",quantity:1,maxQuantity:1,unit_price:this.order.shippingCosts.totalPrice,selected:!1,disabled:!1,product:this.$tc("sw-order.payone-payment.modal.shippingCosts")})},closeRefundModal(){this.showRefundModal=!1},onRefundFinished(){this.isRefundSuccessful=!1},refundOrder(){let e={orderTransactionId:this.transaction.id,payone_order_id:this.transaction.extensions.payonePaymentOrderTransactionData.transactionId,salesChannel:this.order.salesChannel,amount:this.refundAmount,orderLines:[],complete:this.refundAmount===this.maxRefundAmount,includeShippingCosts:!1};this.isLoading=!0,this.selectedItems.forEach(t=>{if("shipping"===t.id)e.includeShippingCosts=!0;else{let n=this.order.lineItems.find(e=>e.id===t.id);if(n){let i={...n};i.quantity=t.quantity,i.total_amount=i.unit_price*i.quantity,i.total_tax_amount=i.total_amount-i.total_amount/(1+i.tax_rate/100),e.orderLines.push(i)}}}),this.remainingAmount({id:e.id,quantity:this.getRefundableQuantityOfItem(e),unit_price:e.unitPrice,selected:!1})),this.executeRefund(e)},executeRefund(e){this.PayonePaymentService.refundPayment(e).then(()=>{this.createNotificationSuccess({title:this.$tc("sw-order.payone-payment.refund.successTitle"),message:this.$tc("sw-order.payone-payment.refund.successMessage")}),this.isRefundSuccessful=!0}).catch(e=>{this.createNotificationError({title:this.$tc("sw-order.payone-payment.refund.errorTitle"),message:e.message}),this.isRefundSuccessful=!1}).finally(()=>{this.isLoading=!1,this.closeRefundModal(),this.$nextTick().then(()=>{this.$emit("reload")})})}},watch:{items:{handler(){this.calculateActionAmount()},deep:!0}}}},104:function(e,t,n){var i=n(824);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),n(346).Z("02bce55d",i,!0,{})},346:function(e,t,n){"use strict";function i(e,t){for(var n=[],i={},r=0;rn.parts.length&&(i.parts.length=n.parts.length)}else{for(var a=[],r=0;r\n \n \n\n \n\n \n \n\n \n \n \n \n{% endblock %}\n',inject:["repositoryFactory"],props:{order:{type:Object,required:!0}},data(){return{webhookLogs:[],isLoading:!1,showWebhookDetails:null}},computed:{webhookLogRepository(){return this.repositoryFactory.create("payone_payment_webhook_log")},assetFilter(){return a.getByName("asset")},dateFilter(){return a.getByName("date")},webhookLogColumns(){return[{property:"transactionId",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleTransactionId")},{property:"transactionState",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleTransactionState")},{property:"sequenceNumber",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleSequenceNumber")},{property:"clearingType",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleClearingType")},{property:"webhookDateTime",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleWebhookDateTime")}]},keyValueColumns(){return[{property:"key",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleKey")},{property:"value",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleValue")}]}},created(){this.createdComponent()},methods:{createdComponent(){this.getWebhookLogs()},reloadWebhookLogs(){this.getWebhookLogs()},getWebhookLogs(){let e=new n;return e.addFilter(n.equals("orderId",this.order.id)),e.addSorting(n.sort("webhookDateTime","ASC",!0)),this.isLoading=!0,this.webhookLogRepository.search(e,Shopware.Context.api).then(e=>{this.webhookLogs=e,this.isLoading=!1})},openDetails(e){this.showWebhookDetails=e.webhookDetails},onCloseWebhookModal(){this.showWebhookDetails=null},toKeyValueSource(e){let o=[];for(let t in e)o.push({key:t,value:e[t]});return o.sort((e,o)=>e.key.localeCompare(o.key)),o},downloadAsTxt(e,o,t){let n=document.createElement("a");n.href="data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,4)),n.download=`PAYONE-${o}-${t}.txt`,n.dispatchEvent(new MouseEvent("click")),n.remove()}}}}}]); \ No newline at end of file diff --git a/src/Resources/public/static/js/d025cd2c5ea617156ce8.js b/src/Resources/public/static/js/d025cd2c5ea617156ce8.js new file mode 100644 index 00000000..538d0ba4 --- /dev/null +++ b/src/Resources/public/static/js/d025cd2c5ea617156ce8.js @@ -0,0 +1 @@ +(window["webpackJsonpPluginpayone-payment"]=window["webpackJsonpPluginpayone-payment"]||[]).push([[545],{260:function(){},545:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}}),n(932);let{Mixin:i,Filter:r}=Shopware;var a={template:'{% block payone_payment_payment_details %}\n
\n \n \n {{ $tc(\'sw-order.payone-payment.capture.buttonTitle\') }}\n \n \n\n \n \n\n
\n \n \n \n \n \n \n
\n\n \n
\n
\n{% endblock %}\n',mixins:[i.getByName("notification")],inject:["PayonePaymentService"],props:{order:{type:Object,required:!0},transaction:{type:Object,required:!0}},data(){return{isLoading:!1,hasError:!1,showCaptureModal:!1,isCaptureSuccessful:!1,captureAmount:0,includeShippingCosts:!1,items:[]}},computed:{currencyFilter(){return r.getByName("currency")},payoneCurrencyFilter(){return r.getByName("payone_currency")},orderTotalPrice(){return this.transaction.amount.totalPrice},decimalPrecision(){return this.order&&this.order.currency?this.order.currency.decimalPrecision?this.order.currency.decimalPrecision:this.order.currency.itemRounding?this.order.currency.itemRounding.decimals:void 0:2},capturedAmount(){return this.toFixedPrecision((this.transaction?.extensions?.payonePaymentOrderTransactionData?.capturedAmount??0)/100)},remainingAmount(){return this.toFixedPrecision(this.orderTotalPrice-this.capturedAmount)},buttonEnabled(){return!!this.transaction?.extensions?.payonePaymentOrderTransactionData&&(this.remainingAmount>0||this.transaction.extensions.payonePaymentOrderTransactionData.allowCapture)},selectedItems(){return this.items.filter(e=>e.selected&&e.quantity>0)},hasRemainingShippingCosts(){return!(this.order.shippingCosts.totalPrice<=0)&&this.toFixedPrecision(this.capturedAmount+this.order.shippingCosts.totalPrice)<=this.orderTotalPrice}},methods:{toFixedPrecision(e){return Math.round(e*10**this.decimalPrecision)/10**this.decimalPrecision},calculateActionAmount(){let e=0;this.selectedItems.forEach(t=>{e+=t.unit_price*t.quantity}),this.captureAmount=this.toFixedPrecision(e>this.remainingAmount?this.remainingAmount:e)},openCaptureModal(){this.showCaptureModal=!0,this.isCaptureSuccessful=!1,this.initItems()},initItems(){this.items=this.order.lineItems.map(e=>{let t=e.quantity-(e.customFields?.payone_captured_quantity??0);return{id:e.id,quantity:t,maxQuantity:t,unit_price:e.unitPrice,selected:!1,product:e.label,orderItem:e,disabled:t<=0}}),this.order.shippingCosts.totalPrice>0&&this.items.push({id:"shipping",quantity:1,maxQuantity:1,unit_price:this.order.shippingCosts.totalPrice,selected:!1,disabled:!1,product:this.$tc("sw-order.payone-payment.modal.shippingCosts")})},closeCaptureModal(){this.showCaptureModal=!1},onCaptureFinished(){this.isCaptureSuccessful=!1},captureOrder(){let e={orderTransactionId:this.transaction.id,payone_order_id:this.transaction.extensions.payonePaymentOrderTransactionData.transactionId,salesChannel:this.order.salesChannel,amount:this.captureAmount,orderLines:[],complete:this.captureAmount===this.remainingAmount,includeShippingCosts:!1};this.isLoading=!0,this.selectedItems.forEach(t=>{if("shipping"===t.id)e.includeShippingCosts=!0;else{let n=this.order.lineItems.find(e=>e.id===t.id);if(n){let i={...n};i.quantity=t.quantity,i.total_amount=i.unit_price*i.quantity,i.total_tax_amount=i.total_amount-i.total_amount/(1+i.tax_rate/100),e.orderLines.push(i)}}}),this.remainingAmount({id:e.id,quantity:e.quantity-(e.customFields?.payone_captured_quantity??0),unit_price:e.unitPrice,selected:!1})),this.executeCapture(e)},executeCapture(e){this.PayonePaymentService.capturePayment(e).then(()=>{this.createNotificationSuccess({title:this.$tc("sw-order.payone-payment.capture.successTitle"),message:this.$tc("sw-order.payone-payment.capture.successMessage")}),this.isCaptureSuccessful=!0}).catch(e=>{this.createNotificationError({title:this.$tc("sw-order.payone-payment.capture.errorTitle"),message:e.message}),this.isCaptureSuccessful=!1}).finally(()=>{this.isLoading=!1,this.closeCaptureModal(),this.$nextTick().then(()=>{this.$emit("reload")})})}},watch:{items:{handler(){this.calculateActionAmount()},deep:!0}}}},932:function(e,t,n){var i=n(260);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals),n(346).Z("51905cf9",i,!0,{})},346:function(e,t,n){"use strict";function i(e,t){for(var n=[],i={},r=0;rn.parts.length&&(i.parts.length=n.parts.length)}else{for(var s=[],r=0;r\n \n \n \n\n \n \n \n{% endblock %}\n',props:{items:{type:Array,required:!0},order:{type:Object,required:!0}},computed:{currencyFilter:()=>r.getByName("currency"),orderItemColumns(){return[{property:"product",label:this.$tc("sw-order.payone-payment.modal.columns.product"),rawData:!0},{property:"quantity",label:this.$tc("sw-order.payone-payment.modal.columns.quantity"),rawData:!0},{property:"price",label:this.$tc("sw-order.payone-payment.modal.columns.price"),rawData:!0}]}},methods:{updateSelection(e){let t=Object.keys(e);this.items.forEach(e=>{e.selected=t.includes(e.id)})}}}},652:function(e,t,n){var r=n(571);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),n(346).Z("f83375d2",r,!0,{})},346:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;an.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],a=0;a\n {% block payone_payment_header %}\n \n {% endblock %}\n\n {% block payone_payment_actions %}\n \n {% endblock %}\n\n {% block payone_payment_settings_content %}\n \n {% endblock %}\n\n{% endblock %}\n',mixins:[a.getByName("notification"),a.getByName("sw-inline-snippet")],inject:["PayonePaymentSettingsService","acl"],data(){return{isLoading:!1,isTesting:!1,isSaveSuccessful:!1,isTestSuccessful:!1,isApplePayCertConfigured:!0,isSupportModalOpen:!1,stateMachineTransitionActions:[],displayStatusMapping:{}}},created(){this.createdComponent()},metaInfo(){return{title:this.$createTitle()}},methods:{createdComponent(){this.PayonePaymentSettingsService.hasApplePayCert().then(e=>{this.isApplePayCertConfigured=e})},saveFinish(){this.isSaveSuccessful=!1},testFinish(){this.isTestSuccessful=!1},getConfigValue(e){let n=this.$refs.systemConfig.actualConfigData,t=n.null,a=this.$refs.systemConfig.currentSalesChannelId;return null===a?n.null[`PayonePayment.settings.${e}`]:n[a][`PayonePayment.settings.${e}`]||t[`PayonePayment.settings.${e}`]},getPaymentConfigValue(e,n){let t=e.charAt(0).toUpperCase()+e.slice(1);return this.getConfigValue(n+t)||this.getConfigValue(e)},onSave(){this.isSaveSuccessful=!1,this.isLoading=!0,this.$refs.systemConfig.saveAll().then(e=>{this.handleRatepayProfileUpdates(e),this.isSaveSuccessful=!0}).finally(()=>{this.isLoading=!1})},onTest(){this.isTesting=!0,this.isTestSuccessful=!1;let e={};this.$refs.systemConfig.config.forEach(n=>{let t=n.name.match(/^payment_(.+)$/),a=t?t[1]:null;a&&(e[a]={merchantId:this.getPaymentConfigValue("merchantId",a),accountId:this.getPaymentConfigValue("accountId",a),portalId:this.getPaymentConfigValue("portalId",a),portalKey:this.getPaymentConfigValue("portalKey",a)})}),this.PayonePaymentSettingsService.validateApiCredentials(e).then(e=>{let n=e.testCount,t=e.credentialsValid,a=e.errors;if(t)this.createNotificationSuccess({title:this.$tc("payone-payment.settingsForm.titleSuccess"),message:n>0?this.$tc("payone-payment.settingsForm.messageTestSuccess"):this.$tc("payone-payment.settingsForm.messageTestNoTestedPayments")}),this.isTestSuccessful=!0;else for(let e in a)if(a.hasOwnProperty(e)){this.createNotificationError({title:this.$tc("payone-payment.settingsForm.titleError"),message:this.$tc("payone-payment.settingsForm.messageTestError."+e)});let n=a[e];"string"==typeof n&&this.createNotificationError({title:this.$tc("payone-payment.settingsForm.titleError"),message:n})}}).catch(e=>{this.createNotificationError({title:this.$tc("payone-payment.settingsForm.titleError"),message:this.$tc("payone-payment.settingsForm.messageTestError.general")})}).finally(()=>{this.isTesting=!1})},handleRatepayProfileUpdates(e){let n=this.$refs.systemConfig.currentSalesChannelId;if(e.payoneRatepayProfilesUpdateResult&&e.payoneRatepayProfilesUpdateResult[n]){let t=e.payoneRatepayProfilesUpdateResult[n];this.$root.$emit("payone-ratepay-profiles-update-result",t),Array.isArray(t.errors)||this.createNotificationError({title:this.$tc("payone-payment.settingsForm.titleError"),message:this.$tc("payone-payment.settingsForm.messageSaveError.ratepayProfilesUpdateFailed")})}}}}},342:function(e,n,t){var a=t(309);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals),t(346).Z("5227a589",a,!0,{})},346:function(e,n,t){"use strict";function a(e,n){for(var t=[],a={},s=0;st.parts.length&&(a.parts.length=t.parts.length)}else{for(var o=[],s=0;s\n {% block payone_ratepay_shop_ids %}\n

{{ $tc(\'payone-payment.general.headlines.ratepayProfiles\') }}

\n \n\n {% block payone_ratepay_shop_ids_actions %}\n \n\n {% block payone_ratepay_shop_ids_create_actions %}\n
\n \n {{ $tc(\'payone-payment.general.actions.addShop\') }}\n \n
\n {% endblock %}\n
\n {% endblock %}\n\n {% block payone_ratepay_shop_ids_grid %}\n \n {% block payone_ratepay_shop_ids_grid_columns %}\n {% block payone_ratepay_shop_ids_grid_column_status %}\n \n {% endblock %}\n\n {% block payone_ratepay_shop_ids_bulk_actions %}\n \n {% endblock %}\n {% endblock %}\n \n {% endblock %}\n\n {% block payone_ratepay_shop_ids_error %}\n \n {{ $tc(\'payone-payment.general.errors.existingShopId\') }}\n \n\n \n {{ $tc(\'payone-payment.general.errors.emptyInputs\') }}\n \n {% endblock %}\n
\n {% endblock %}\n \n{% endblock %}\n',props:{value:{type:Array,required:!1,default(){return[]}},name:{type:String,required:!0}},data(){return{selectedItems:{},newItem:null,showDuplicateAlert:!1,showEmptyAlert:!1,profiles:this.value}},computed:{getLineItemColumns(){return[{property:"shopId",dataIndex:"shopId",label:this.$tc("payone-payment.general.label.shopId"),allowResize:!1,inlineEdit:"string",width:"200px",primary:!0},{property:"currency",dataIndex:"currency",label:this.$tc("payone-payment.general.label.currency"),allowResize:!1,inlineEdit:"string",width:"200px",primary:!0},{property:"error",label:this.$tc("payone-payment.general.label.error"),allowResize:!1,width:"100px",primary:!0}]}},watch:{profiles(e){this.$emit("update:value",e),this.$emit("input",e),this.$emit("change",e)}},created(){this.createdComponent()},destroyed(){this.destroyedComponent()},methods:{createdComponent(){this.$root.$on("payone-ratepay-profiles-update-result",this.onProfilesUpdateResult)},destroyedComponent(){this.$root.$off("payone-ratepay-profiles-update-result")},onProfilesUpdateResult(e){if(e.updates[this.name]&&(this.profiles=e.updates[this.name]),e.errors[this.name])for(let t of e.errors[this.name])this.profiles.push(t)},onInlineEditCancel(e){""===e.shopId&&""===e.currency&&this.profiles.forEach(function(t,n,r){t.id===e.id&&r.splice(n,1)}),this.$emit("item-cancel")},onInlineEditSave(e){if(""!==e.shopId&&""!==e.currency){this.showEmptyAlert=!1;let t=!1;this.profiles.forEach(function(n){n.id!==e.id&&n.shopId===e.shopId&&(t=!0)}),t?(this.showDuplicateAlert=!0,this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e.id,this.$refs.shopIdsDataGrid.enableInlineEdit()})):this.showDuplicateAlert=!1}else this.showEmptyAlert=!0,this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e.id,this.$refs.shopIdsDataGrid.enableInlineEdit()});this.$emit("update-list",this.profiles)},createNewLineItem(){if(0===this.profiles.length){this.createLine();return}""!==this.profiles[this.profiles.length-1].shopId&&this.createLine()},createLine(){let e=r.createId();this.profiles.push({id:e,shopId:"",currency:""}),this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e,this.$refs.shopIdsDataGrid.enableInlineEdit()})},onDeleteSelectedItem(e){this.profiles=this.profiles.filter(t=>t.shopId!==e.shopId),this.$emit("deleted",this.profiles)}}}},978:function(e,t,n){var r=n(221);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),n(346).Z("25f10f6b",r,!0,{})},346:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i\n {% block payone_ratepay_shop_ids %}\n

{{ $tc(\'payone-payment.general.headlines.ratepayProfiles\') }}

\n \n\n {% block payone_ratepay_shop_ids_actions %}\n \n\n {% block payone_ratepay_shop_ids_create_actions %}\n
\n \n {{ $tc(\'payone-payment.general.actions.addShop\') }}\n \n
\n {% endblock %}\n
\n {% endblock %}\n\n {% block payone_ratepay_shop_ids_grid %}\n \n {% block payone_ratepay_shop_ids_grid_columns %}\n {% block payone_ratepay_shop_ids_grid_column_status %}\n \n {% endblock %}\n\n {% block payone_ratepay_shop_ids_bulk_actions %}\n \n {% endblock %}\n {% endblock %}\n \n {% endblock %}\n\n {% block payone_ratepay_shop_ids_error %}\n \n {{ $tc(\'payone-payment.general.errors.existingShopId\') }}\n \n\n \n {{ $tc(\'payone-payment.general.errors.emptyInputs\') }}\n \n {% endblock %}\n
\n {% endblock %}\n \n{% endblock %}\n',props:{value:{type:Array,required:!1,default(){return[]}},name:{type:String,required:!0}},data(){return{selectedItems:{},newItem:null,showDuplicateAlert:!1,showEmptyAlert:!1,profiles:this.value}},computed:{getLineItemColumns(){return[{property:"shopId",dataIndex:"shopId",label:this.$tc("payone-payment.general.label.shopId"),allowResize:!1,inlineEdit:"string",width:"200px",primary:!0},{property:"currency",dataIndex:"currency",label:this.$tc("payone-payment.general.label.currency"),allowResize:!1,inlineEdit:"string",width:"200px",primary:!0},{property:"error",label:this.$tc("payone-payment.general.label.error"),allowResize:!1,width:"100px",primary:!0}]}},watch:{profiles(e){this.$emit("update:value",e),this.$emit("input",e),this.$emit("change",e)}},created(){this.createdComponent()},destroyed(){this.destroyedComponent()},methods:{createdComponent(){this.$root.$on("payone-ratepay-profiles-update-result",this.onProfilesUpdateResult)},destroyedComponent(){this.$root.$off("payone-ratepay-profiles-update-result")},onProfilesUpdateResult(e){if(e.updates[this.name]&&(this.profiles=e.updates[this.name]),e.errors[this.name])for(let t of e.errors[this.name])this.profiles.push(t)},onInlineEditCancel(e){""===e.shopId&&""===e.currency&&this.profiles.forEach(function(t,n,r){t.id===e.id&&r.splice(n,1)}),this.$emit("item-cancel")},onInlineEditSave(e){if(""!==e.shopId&&""!==e.currency){this.showEmptyAlert=!1;let t=!1;this.profiles.forEach(function(n){n.id!==e.id&&n.shopId===e.shopId&&(t=!0)}),t?(this.showDuplicateAlert=!0,this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e.id,this.$refs.shopIdsDataGrid.enableInlineEdit()})):this.showDuplicateAlert=!1}else this.showEmptyAlert=!0,this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e.id,this.$refs.shopIdsDataGrid.enableInlineEdit()});this.$emit("update-list",this.profiles)},createNewLineItem(){if(0===this.profiles.length){this.createLine();return}""!==this.profiles[this.profiles.length-1].shopId&&this.createLine()},createLine(){let e=r.createId();this.profiles.push({id:e,shopId:"",currency:""}),this.$nextTick(()=>{this.$refs.shopIdsDataGrid.currentInlineEditId=e,this.$refs.shopIdsDataGrid.enableInlineEdit()})},onDeleteSelectedItem(e){this.profiles=this.profiles.filter(t=>t.shopId!==e.shopId),this.$emit("deleted",this.profiles)}}}},320:function(e,t,n){var r=n(927);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),n(346).Z("1fea8bf1",r,!0,{})},346:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i\n \n \n\n \n\n \n \n\n \n \n \n \n{% endblock %}\n',inject:["repositoryFactory"],props:{order:{type:Object,required:!0}},data(){return{webhookLogs:[],isLoading:!1,showWebhookDetails:null}},computed:{webhookLogRepository(){return this.repositoryFactory.create("payone_payment_webhook_log")},assetFilter(){return a.getByName("asset")},dateFilter(){return a.getByName("date")},webhookLogColumns(){return[{property:"transactionId",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleTransactionId")},{property:"transactionState",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleTransactionState")},{property:"sequenceNumber",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleSequenceNumber")},{property:"clearingType",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleClearingType")},{property:"webhookDateTime",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleWebhookDateTime")}]},keyValueColumns(){return[{property:"key",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleKey")},{property:"value",label:this.$tc("sw-order.payone-payment.webhookLog.columnTitleValue")}]}},created(){this.createdComponent()},methods:{createdComponent(){this.getWebhookLogs()},reloadWebhookLogs(){this.getWebhookLogs()},getWebhookLogs(){let e=new n;return e.addFilter(n.equals("orderId",this.order.id)),e.addSorting(n.sort("webhookDateTime","ASC",!0)),this.isLoading=!0,this.webhookLogRepository.search(e,Shopware.Context.api).then(e=>{this.webhookLogs=e,this.isLoading=!1})},openDetails(e){this.showWebhookDetails=e.webhookDetails},onCloseWebhookModal(){this.showWebhookDetails=null},toKeyValueSource(e){let o=[];for(let t in e)o.push({key:t,value:e[t]});return o.sort((e,o)=>e.key.localeCompare(o.key)),o},downloadAsTxt(e,o,t){let n=document.createElement("a");n.href="data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,4)),n.download=`PAYONE-${o}-${t}.txt`,n.dispatchEvent(new MouseEvent("click")),n.remove()}}}}}]); \ No newline at end of file