diff --git a/src/Resources/public/administration/js/novalnet-payment.js b/src/Resources/public/administration/js/novalnet-payment.js new file mode 100644 index 0000000..49497c0 --- /dev/null +++ b/src/Resources/public/administration/js/novalnet-payment.js @@ -0,0 +1,2 @@ +!function(t){var e={};function n(a){if(e[a])return e[a].exports;var o=e[a]={i:a,l:!1,exports:{}};return t[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(a,o,function(e){return t[e]}.bind(null,o));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=(window.__sw__.assetPath + '/bundles/novalnetpayment/'),n(n.s="DFWG")}({"2wbU":function(t,e,n){var a=n("PUs7");a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("P8hj").default)("61be6ccd",a,!0,{})},A7M2:function(t){t.exports=JSON.parse('{"novalnet-payment":{"module":{"title":"Novalnet","description":"PCI compliant and seamless integration with various payment types and payment processing services in one unique platform...","projectInfo":"Your project is in test mode","comments":"Comments","generalInfo":"Please read the Installation Guide before you start and login to the Novalnet Admin Portal using your merchant account. To get a merchant account, mail to sales@novalnet.de or call +49 (089) 923068320","globalTitle":"Global Configuration","installationInfo":"For setup and handling of the Novalnet-Payment plugin you can find the installation guide Here","PaymentConfiguration":"Important notice: Payment plugin configurations are now available in the Novalnet Admin Portal. Navigate to the Projects > choose your project > Payment plugin configuration, to configure them.

Novalnet allows you to verify the payment method behaviour before going into production mode by using test payment data. Access the Novalnet test payment data available Here "},"settingForm":{"title":"Novalnet","statusTitle":"Status","amountError":"Invalid amount","buttons":{"save":"Save"},"credentials":{"cardTitle":"Novalnet API Configuration","activationKey":{"label":"Product activation key *","tooltipText":"Your product activation key is a unique token for merchant authentication and payment processing. Get your Product activation key from the Novalnet Admin Portal : Projects > Choose your project > API credentials > API Signature (Product activation key)"},"accessKey":{"label":"Payment access key *","tooltipText":"Your secret key used to encrypt the data to avoid user manipulation and fraud. Get your Payment access key from the Novalnet Admin Portal Projects > Choose your project > API credentials > Payment access key"},"tariff":{"label":"Select Tariff ID *","tooltipText":"Select a Tariff ID to match the preferred tariff plan you created at the Novalnet Admin Portal for this project","emptyText":"Select Tariff ID"},"orderEmailMode":{"label":"Enable Order Confirmation E-mail","tooltipText":"Enable this configuration to send another Order Confirmation e-mail with Novalnet transaction details to the end customer for orders made through Invoice, Invoice with payment guarantee, Direct debit SEPA with payment guarantee, Instalment by invoice, Instalment by SEPA direct debit, Prepayment, Cashpayment, and Multibanco payments. (By default initial Order confirmation e-mail will send to end customers without Novalnet transaction details)"},"onHold":{"label":"Payment onhold status","tooltipText":"Status to be used for on-hold payments."},"complete":{"label":"Payment completion status","tooltipText":"Status to be used for successful payments."}},"merchantSettings":{"cardTitle":"Notification / Webhook URL Setup","deactivateIp":{"label":"Allow manual testing of the Notification / Webhook URL","tooltipText":"Enable this to test the Novalnet Notification / Webhook URL manually. Disable this before setting your shop live to block unauthorized calls from external parties"},"mailTo":{"label":"Send e-mail to","tooltipText":"Notification / Webhook URL execution messages will be sent to this e-mail"},"callbackUrl":{"label":"Notification / Webhook URL","button":"Configure","tooltipText":"You must configure the webhook endpoint in your Novalnet Admin portal. This will allow you to receive notifications about the transaction."}},"extension":{"paidTooltip":"Total paid amount","refundTooltip":"Refunded amount","refundButton":"Refund","amountTitle":"Refund amount","zeroAmountTitle":"Transaction booking amount","refundDescription":"Please enter the refund amount (in minimum unit of currency. E.g. enter 100 which is equal to 1.00)","refundReference":"Refund / Cancellation Reason","confirmLabel":"Confirm","cancelLabel":"Cancel","Managetitle":"Manage Transaction","confirmMessage":"Are you sure you want to capture the payment?","cancelMessage":"Are you sure you want to cancel the payment?","cancelAllCycleMessage":"Are you sure you want to cancel all cycle installment?","cancelRemainingCycleMessage":"Are you sure you want to cancel remaining cycle installment?","refundSuccess":"Your refund was successful.","onholdSuccess":"The transaction has been confirmed.","onholdCancel":"The transaction has been canceled","instalmentCancelLabel":"Instalment Cancel","instalmentAllCancelLabel":"Cancel All Instalment","instalmentRemainCancelLabel":"Cancel All Remaining Instalment","instalmentSuccessMsg":"Instalment canceled successfully.","zeroAmountButton":"Book Amount","bookedSuccess":"Your amount booked was successful.","zeroAmountDescription":"Please enter the amount (in minimum unit of currency. E.g. enter 100 which is equal to 1.00)","bookButton":"Book"},"titleSuccess":"Success","successMessage":"Novalnet merchant details are configured successfully.","titleError":"Error","apiFailureMessage":"Please configure Novalnet Global Configuration","customerFailureMessage":"Please select your customer","currencyFailureMessage":"Please select currency","lineitemFailureMessage":"Please Add Product","amountRefundError":"Invalid refund amount","failureMessage":"Please fill in the required fields","instalmentNumber":"S.No","instalmentReference":"Novalnet Transaction ID","instalmentDate":"Next Instalment Date","instalmentAmount":"Amount","instalmentStatus":"Status","instalmentInfo":"Instalment Summary","webhookUrlFailure":"Please enter the valid Webhook URL","webhookUrlSuccess":"Notification / Webhook URL is configured successfully in Novalnet Admin Portal","emptyMessage":"Enter Product activation key"},"onhold":{"open":"Open","process":"In Progress","authorized":"Authorized","cancel":"Cancelled","failed":"Failed","unconfirmed":"Unconfirmed","paidPartially":"Paid (partially)","paid":"Paid","select":"-- Please select --"}},"sw-privileges":{"permissions":{"novalnet_extension":{"label":"Novalnet Extensions"},"parents":{"novalnet_payment":"Novalnet"},"novalnet_payment":{"label":"Novalnet Settings"}}}}')},DFWG:function(t,e,n){"use strict";n.r(e);n("FRSz");var a=Shopware,o=a.Component,i=a.Mixin,l=a.Defaults,s=(a.Context,Shopware.Data.Criteria);o.register("novalnet-payment-settings",{template:'{% block novalnet_payment_settings %}\n \n {% block novalnet_payment_settings_header %}\n \n {% endblock %}\n \n {% block novalnet_payment_settings_actions %}\n \n {% endblock %}\n \n {% block novalnet_payment_content %}\n\t\t\t\n\t\t\t\n {% endblock %} \n \n \n{% endblock %}\n',mixins:[i.getByName("notification"),i.getByName("sw-inline-snippet")],inject:["repositoryFactory","NovalPaymentApiCredentialsService","acl"],data:function(){return{isLoading:!1,isValidating:!1,isSaveSuccessful:!1,isValidateSuccessful:!1,clientIdFilled:!1,clientSecretFilled:!1,config:{},salesChannels:[]}},computed:{validateButtonDisabled:function(){return this.isLoading||this.isValidating},novalnetConfigRoute:function(){return{name:"novalnet.payment.detail.credentials"}},salesChannelRepository:function(){return this.repositoryFactory.create("sales_channel")}},created:function(){this.createdComponent()},watch:{config:{deep:!0,handler:function(){var t=this.$refs.configComponent.allConfigs.null;null===this.$refs.configComponent.selectedSalesChannelId?this.clientIdFilled=!!this.config["NovalnetPayment.settings.clientId"]:(this.clientIdFilled=!!this.config["NovalnetPayment.settings.clientId"]||!!t["NovalnetPayment.settings.clientId"],this.clientSecretFilled=!!this.config["NovalnetPayment.settings.clientSecret"])}}},methods:{createdComponent:function(){var t=this;this.isLoading=!0;var e=new s;e.addFilter(s.equalsAny("typeId",[l.storefrontSalesChannelTypeId,l.apiSalesChannelTypeId])),this.salesChannelRepository.search(e,Shopware.Context.api).then((function(e){e.add({id:null,translated:{name:t.$tc("sw-sales-channel-switch.labelDefaultOption")}}),t.salesChannels=e})).finally((function(){t.isLoading=!1}))},onSave:function(){this.isSaveSuccessful=!1,this.isLoading=!0;var t=this.getConfigValue("clientId"),e=this.getConfigValue("accessKey");if(""!==this.getConfigValue("clientId")&&void 0!==this.getConfigValue("clientId"))this.getConfigValue("clientId").replace(/\s/g,"");if(""!==this.getConfigValue("accessKey")&&void 0!==this.getConfigValue("accessKey"))this.getConfigValue("accessKey").replace(/\s/g,"");return void 0===t||""==t?(this.isLoading=!1,void this.createNotificationError({title:this.$tc("novalnet-payment.settingForm.titleError"),message:this.$tc("novalnet-payment.settingForm.emptyMessage")})):void 0===e||""==e?(this.isLoading=!1,void this.createNotificationError({title:this.$tc("novalnet-payment.settingForm.titleError"),message:this.$tc("novalnet-payment.settingForm.emptyAccessKeyMessage")})):void this.checkBackendConfiguration()},getConfigValue:function(t){var e=this.$refs.configComponent.allConfigs.null;return null===this.$refs.configComponent.selectedSalesChannelId?this.config["NovalnetPayment.settings.".concat(t)]:this.config["NovalnetPayment.settings.".concat(t)]||e["NovalnetPayment.settings.".concat(t)]},checkBackendConfiguration:function(){var t=this,e=this.getConfigValue("clientId").replace(/\s/g,""),n=this.getConfigValue("accessKey").replace(/\s/g,"");this.NovalPaymentApiCredentialsService.validateApiCredentials(e,n).then((function(e){if(t.isLoading=!1,null!=e.serverResponse&&""!=e.serverResponse)return 100!=e.serverResponse.result.status_code?void t.createNotificationError({title:t.$tc("novalnet-payment.settingForm.titleError"),message:e.serverResponse.result.status_text}):(e.tariffResponse.forEach((function(e){null!=t.config["NovalnetPayment.settings.tariff"]&&""!=t.config["NovalnetPayment.settings.tariff"]||(t.config["NovalnetPayment.settings.tariff"]=e.id)})),t.config["NovalnetPayment.settings.clientKey"]=e.serverResponse.merchant.client_key,t.$refs.configComponent.save().then((function(e){t.isSaveSuccessful=!0,e&&(t.config=e)})).catch((function(){t.isLoading=!1})),void t.createNotificationSuccess({title:t.$tc("novalnet-payment.settingForm.titleSuccess"),message:t.$tc("novalnet-payment.settingForm.successMessage")}));t.createNotificationError({title:t.$tc("novalnet-payment.settingForm.titleError"),message:t.$tc("novalnet-payment.settingForm.apiFailureMessage")})})).catch((function(e){t.createNotificationError({title:t.$tc("novalnet-payment.settingForm.titleError"),message:t.$tc("novalnet-payment.settingForm.errorMessage")}),t.isLoading=!1,t.isTestSuccessful=!1}))}},metaInfo:function(){return{title:this.$createTitle()}}});n("2wbU");function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function d(t){for(var e=1;e\n\t
\n\t\t\n\n\t\t\t{% block novalnet_payment_content_card_channel_config_credentials_card_container %}\n\t\t\t\t\n\n\t\t\t\t\t{% block novalnet_payment_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{ $tc(\'novalnet-payment.module.projectInfo\') }}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t{% block novalnet_payment_content_card_channel_config_credentials_card_container_settings_client_id %}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t\t\t{% block novalnet_payment_content_card_channel_config_credentials_card_container_settings_break %}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t\t{% block novalnet_payment_content_card_channel_config_credentials_card_container_settings_client_secret %}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t\t
\n\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t{% block novalnet_payment_content_card_loading %}\n \n {% endblock %}\n\n\t\t\t\t
\n\t\t\t{% endblock %}\n\t\t
\n\t{% endblock %}\n\t{% block novalnet_payment_content_card_channel_config_merchant_credentials %}\n\t\t\n\t\t\t{% block novalnet_payment_content_card_channel_config_merchant_credentials_card_container %}\n\t\t\t\t\n\t\t\t\t\t{% block novalnet_payment_content_card_channel_config_merchant_credentials_card_container_settings %}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{% block novalnet_payment_content_card_channel_config_merchant_credentials_card_container_settings_ip %}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{{ $tc(\'novalnet-payment.settingForm.merchantSettings.callbackUrl.button\') }}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t\t
\n\t\t\t\t\t{% endblock %}\n\t\t\t\t
\n\t\t\t{% endblock %}\n\t\t
\n\t
\n\n{% endblock %}\n',mixins:[h.getByName("notification"),h.getByName("sw-inline-snippet")],name:"NovalnetPaymentCredentials",icon:"default-action-settings",props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},domain:{type:String,required:!0,default:""}},data:function(){return{allConfigs:{},config:{},tariffOptions:[],onHoldOptions:[],completeOptions:[],actualConfigData:{},shouldDisable:!1,projectMode:!1,apiActivationKey:"",paymentAccessKey:"",tariffId:"",isLoading:!1,isRequested:"",showMessage:!1,buttonLoad:!1,NovalnetPaymentCallBackUrl:(window.location.protocol+"//"+window.location.host+window.location.pathname).split("/admin").join("")+"/novalnet/callback",generalInformation:this.$tc("novalnet-payment.module.generalInfo"),PaymentConfiguration:this.$tc("novalnet-payment.module.PaymentConfiguration"),onhold:"authorized",completed:"paid",completeStatusId:"",onHoldStatusId:""}},inject:["repositoryFactory","NovalPaymentApiCredentialsService","systemConfigApiService","acl"],watch:{actualConfigData:{handler:function(t){t&&this.$emit("input",t)},deep:!0}},computed:{actualConfigData:{get:function(){return this.allConfigs[this.selectedSalesChannelId]},set:function(t){this.allConfigs=d(d({},this.allConfigs),{},u({},this.selectedSalesChannelId,t))}}},created:function(){this.createdComponent()},updated:function(){this.createdComponent()},methods:{checkTextFieldInheritance:function(t){return"string"!=typeof t||t.length<=0},checkBoolFieldInheritance:function(t){return"boolean"!=typeof t},checkNumberFieldInheritance:function(t){return"int"!=typeof t},onCheckApi:function(){"NovalnetPayment.settings.clientId"===event.target.name?this.apiActivationKey=this.actualConfigData["NovalnetPayment.settings.clientId"]=event.target.value:"NovalnetPayment.settings.accessKey"===event.target.name&&(this.paymentAccessKey=this.actualConfigData["NovalnetPayment.settings.accessKey"]=event.target.value),""!==this.apiActivationKey||""!==this.paymentAccessKey?(this.isRequested="",this.showMessage=!0,this.createdComponent()):this.createNotificationError({title:this.$tc("novalnet-payment.settingForm.titleError"),message:this.$tc("novalnet-payment.settingForm.apiFailureMessage")})},createdComponent:function(){var t=this,e=this;void 0!==this.actualConfigData&&this.isRequested!==this.selectedSalesChannelId&&(this.isRequested=this.selectedSalesChannelId,this.apiActivationKey=this.actualConfigData["NovalnetPayment.settings.clientId"]||this.allConfigs.null["NovalnetPayment.settings.clientId"],this.paymentAccessKey=this.actualConfigData["NovalnetPayment.settings.accessKey"]||this.allConfigs.null["NovalnetPayment.settings.accessKey"],this.onHoldId=this.actualConfigData["NovalnetPayment.settings.onHoldStatus"]||this.allConfigs.null["NovalnetPayment.settings.onHoldStatus"],this.completeId=this.actualConfigData["NovalnetPayment.settings.completeStatus"]||this.allConfigs.null["NovalnetPayment.settings.completeStatus"],void 0!==this.onHoldStatusId&&""!==this.onHoldStatusId||(this.onHoldStatusId="authorized"),void 0!==this.completeStatusId&&""!==this.completeStatusId||(this.completeStatusId="paid"),void 0!==this.apiActivationKey&&""!==this.apiActivationKey&&void 0!==this.paymentAccessKey&&""!==this.paymentAccessKey&&(this.apiActivationKey=this.apiActivationKey.replace(/\s/g,""),this.paymentAccessKey=this.paymentAccessKey.replace(/\s/g,""),this.isLoading=!0,this.NovalPaymentApiCredentialsService.validateApiCredentials(this.apiActivationKey,this.paymentAccessKey).then((function(n){var a=n.serverResponse.result.status_code;t.isLoading=!1,100!==a?(!0===t.showMessage&&t.createNotificationError({title:t.$tc("novalnet-payment.settingForm.titleError"),message:n.serverResponse.result.status_text,autoClose:!0}),t.showMessage=!1):(e.tariffOptions=[],n.tariffResponse.forEach((function(a){t.actualConfigData["NovalnetPayment.settings.clientKey"]=n.serverResponse.merchant.client_key,e.tariffOptions.push({value:a.id,label:a.name}),void 0!==t.tariffId&&""!==t.tariffId||(t.tariffId=a.id),!0===t.showMessage&&t.createNotificationSuccess({title:t.$tc("novalnet-payment.settingForm.titleSuccess"),message:t.$tc("novalnet-payment.settingForm.successMessage"),autoClose:!0}),t.showMessage=!1,1===n.serverResponse.merchant.test_mode&&(t.projectMode=!0)})))})).catch((function(e){t.isLoading=!1})))),this.onHoldOptions=[{value:"open",label:this.$tc("novalnet-payment.onhold.open")},{value:"process",label:this.$tc("novalnet-payment.onhold.process")},{value:"authorized",label:this.$tc("novalnet-payment.onhold.authorized")},{value:"cancel",label:this.$tc("novalnet-payment.onhold.cancel")},{value:"failed",label:this.$tc("novalnet-payment.onhold.failed")}],this.completeOptions=[{value:"paid",label:this.$tc("novalnet-payment.onhold.paid")},{value:"paidPartially",label:this.$tc("novalnet-payment.onhold.paidPartially")},{value:"cancel",label:this.$tc("novalnet-payment.onhold.cancel")},{value:"failed",label:this.$tc("novalnet-payment.onhold.failed")}]},configureWebhookUrl:function(){var t=this,e=this.apiActivationKey||this.actualConfigData["NovalnetPayment.settings.clientKey"],n=this.paymentAccessKey||this.actualConfigData["NovalnetPayment.settings.accessKey"];if(void 0!==e&&""!==e&&void 0!==n&&""!==n){if(this.NovalnetPaymentCallBackUrl){if(!1===/^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,}(:[0-9]{1,5})?(\/.*)?$/i.test(this.NovalnetPaymentCallBackUrl))return this.createNotificationError({message:this.$tc("novalnet-payment.settingForm.webhookUrlFailure")}),!1;this.buttonLoad=!0,this.NovalPaymentApiCredentialsService.configureWebhookUrl(this.NovalnetPaymentCallBackUrl,e,n).then((function(e){void 0!==e.result.status&&null!=e.result.status&&""!==e.result.status&&"SUCCESS"===e.result.status?t.createNotificationSuccess({message:t.$tc("novalnet-payment.settingForm.webhookUrlSuccess")}):void 0!==e.result.status_text&&null!=e.result.status_text&&""!==e.result.status_text?t.createNotificationError({message:e.result.status_text}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.webhookUrlFailure")}),t.buttonLoad=!1})).catch((function(e){t.buttonLoad=!1}))}}else this.createNotificationError({title:this.$tc("novalnet-payment.settingForm.titleError"),message:this.$tc("novalnet-payment.settingForm.apiFailureMessage")})}}});Shopware.Component.register("novalnet-payment-settings-icon",{template:'{% block novalnet_payment_settings_icon %}\n \n{% endblock %}\n'});n("bGT3");var g=Shopware,y=g.Context,v=g.Component,b=(g.Filter,g.Utils,Shopware.Data.Criteria),_=Shopware.Utils.format.currency;v.override("sw-order-detail-details",{template:'{% block sw_order_detail_details_payment %}\n\t\n\t\n\t\n\n \n {% block sw_order_detail_details_payment_billing_address %}\n \n {% endblock %}\n\n \n {% block sw_order_detail_details_payment_method_select %}\n \n\t\t\t{% if paymentMethod !=\'\' %}\n\t\t\t\t \n\t\t\t\t\n\t\t\t{% else %}\n\t\t\t\t\n\t\t\t{% endif %}\t\n \n {% endblock %}\n\n \n \n\t\n\t{% block sw_order_detail_details_payment_novalnet_seaction %}\n\t\t\n\t\t\n\t{% endblock %}\n{% endblock %}\n',inject:["NovalPaymentApiCredentialsService","repositoryFactory","acl"],mixins:["notification"],props:{orderId:{type:String,required:!0},paymentDetails:{type:Object,required:!0}},data:function(){return{status:0,displayPaidAmount:0,refundedAmount:0,orderAmount:0,displayOrderAmount:0,InstalmentInfo:[],item:{},novalnetComments:"",isNovalnetPayment:!1,refundModalVisible:!1,confirmModalVisible:!1,zeroAmountVisible:!1,cancelModalVisible:!1,canInstalmentAllCancel:!1,canInstalmentRemainCancel:!1,instalmentRefundModalVisible:!1,canCaptureVoid:!1,canRefund:!1,canZeroAmountBooking:!1,canInstalmentCancel:!1,canInstalmentShow:!1,instalmentRefundAmount:0,paymentMethod:"",payLater:["INVOICE","CASHPAYMENT","MULTIBANCO","PREPAYMENT"],instalmentPayments:["INSTALMENT_INVOICE","INSTALMENT_DIRECT_DEBIT_SEPA"],onholdStatus:["91","99","98","85"]}},computed:{getInstalmentColums:function(){return[{property:"number",dataIndex:"number",label:this.$tc("novalnet-payment.settingForm.instalmentNumber"),width:"50px"},{property:"reference",dataIndex:"reference",label:this.$tc("novalnet-payment.settingForm.instalmentReference"),width:"120px"},{property:"amount",dataIndex:"amount",label:this.$tc("novalnet-payment.settingForm.instalmentAmount"),width:"80px"},{property:"totalAmount",dataIndex:"totalAmount",visible:!1},{property:"refundAmount",dataIndex:"refundAmount",visible:!1},{property:"nextCycle",dataIndex:"nextCycle",label:this.$tc("novalnet-payment.settingForm.instalmentDate"),width:"120px"},{property:"status",dataIndex:"status",label:this.$tc("novalnet-payment.settingForm.instalmentStatus"),width:"80px"}]}},watch:{orderId:{deep:!0,handler:function(){var t=this;if(this.orderId){var e=this.repositoryFactory.create("order"),n=new b(1,1);n.addAssociation("transactions"),n.addAssociation("currency"),n.addFilter(b.equals("id",this.orderId)),e.search(n,y.api).then((function(e){var n=e.first();if(n){t.identifier||(t.identifier=n.orderNumber);var a=!1,o="",i=t.$tc("novalnet-payment.module.comments");n.transactions.sort((function(t,e){return new Date(e.createdAt)-new Date(t.createdAt)})).forEach((function(e){if(e.customFields&&e.customFields.novalnet_comments)return t.stateMachineState=e.stateMachineState.name,a=!0,""!=o&&(o+="
"+i+"
"),o+=e.customFields.novalnet_comments.split("/ ").join("
"),!0})),a?(t.novalnetComments=o.split("&&").join("
"+i+"
"),t.setNovalnetPayment(!0)):t.setNovalnetPayment(!1),null!=t.order.transactions.last().paymentMethod.customFields&&null!=t.order.transactions.last().paymentMethod.customFields.novalnet_payment_method_name&&"novalnetpay"==t.order.transactions.last().paymentMethod.customFields.novalnet_payment_method_name?t.NovalPaymentApiCredentialsService.getNovalnetPaymentMethod(t.order.orderNumber).then((function(e){null!=e&&null!=e&&null!=e.paymentName&&null!=e.paymentName?t.paymentMethod=e.paymentName:t.paymentMethod=t.order.transactions.last().paymentMethod.translated.distinguishableName})).catch((function(e){t.createNotificationError({message:"".concat(e.title,": ").concat(e.message)})})):t.paymentMethod=t.order.transactions.last().paymentMethod.translated.distinguishableName,t.orderAmount=Math.round(100*Number(n.price.totalPrice)),t.displayOrderAmount=_(n.price.totalPrice,n.currency.shortName),t.displayPaidAmount=_(0,n.currency.shortName),t.refundedAmount=_(0,n.currency.shortName),t.canCaptureVoid=!1,t.canRefund=!1,t.canZeroAmountBooking=!1,t.canInstalmentCancel=!1,t.canInstalmentShow=!1,t.InstalmentInfo=[],t.canInstalmentAllCancel=!1,t.canInstalmentRemainCancel=!1,t.NovalPaymentApiCredentialsService.getNovalnetAmount(n.orderNumber).then((function(e){if(""!=e.data&&null!=e.data&&e.data.gatewayStatus){var a=JSON.parse(e.data.additionalDetails);if(t.refundableAmount=Number(e.data.amount)-Number(e.data.refundedAmount),0!=e.data.amount&&(t.displayOrderAmount=_(e.data.amount/100,n.currency.shortName)),"ON_HOLD"==e.data.gatewayStatus||t.onholdStatus.includes(e.data.gatewayStatus)?t.canCaptureVoid=!0:(e.data.amount>0&&"CONFIRMED"==e.data.gatewayStatus&&!t.instalmentPayments.includes(e.data.paymentType)&&Number(e.data.refundedAmount)=t.totalAmount||!this.acl.can("novalnet_extension.editor")}}});n("VJiQ");var w=Shopware,C=w.Component,k=w.State,S=w.Mixin,N=(w.Filter,w.Context),P=(w.ContextSwitchParameters,Shopware.Data.Criteria);Shopware.Utils.format.currency;C.override("sw-order-create-details",{template:'{% block sw_order_create_details_payment %}\n\n\t{% parent %}\n\t{% block sw_order_create_details_payment_novalnet_seaction %}\n\t\t\n\t\t\n\t{% endblock %}\n{% endblock %}\n',inject:["NovalPaymentApiCredentialsService","repositoryFactory","acl"],mixins:[S.getByName("notification")],data:function(){return{isLoading:!1,loaded:!1,shouldDisable:!0,iframe:{src:""},paymentformurl:"",novalnetPayment:!1}},computed:{customer:function(){return k.get("swOrder").customer},cart:function(){return k.get("swOrder").cart},currency:function(){return k.get("swOrder").context.currency},cartPrice:function(){return this.cart.price},salesChannelContext:function(){return k.get("swOrder").context}},watch:{salesChannelContext:{deep:!0,handler:function(){var t=this;if(this.customer&&this.isCartTokenAvailable){this.isLoading=!0;var e=this.repositoryFactory.create("payment_method"),n=new P(1,1);n.addFilter(P.equals("id",this.salesChannelContext.paymentMethod.id)),e.search(n,N.api).then((function(e){var n=e.first();if(n&&(t.novalnetPayment=!1,null!=n.customFields&&"novalnetpay"==n.customFields.novalnet_payment_method_name)){if(null==t.currency)return void t.createNotificationError({title:t.$tc("novalnet-payment.settingForm.titleError"),message:t.$tc("novalnet-payment.settingForm.currencyFailureMessage")});if(null!=t.cartPrice&&(0==t.cartPrice.totalPrice||null==t.cartPrice.totalPrice))return void t.createNotificationError({title:t.$tc("novalnet-payment.settingForm.titleError"),message:t.$tc("novalnet-payment.settingForm.lineitemFailureMessage")});t.novalnetPayment=!0;var a="",o="";null!==t.salesChannelContext.customer.defaultBillingAddress?a=t.salesChannelContext.customer.defaultBillingAddress:null!=t.context.billingAddressId&&t.customer.addresses.forEach((function(e){e.id==t.context.billingAddressId&&(a=e)})),null!==t.salesChannelContext.customer.defaultShippingAddress?o=t.salesChannelContext.customer.defaultShippingAddress:null!=t.context.shippingAddressId&&t.customer.addresses.forEach((function(e){e.id==t.context.shippingAddressId&&(a=e)}));var i=t.NovalPaymentApiCredentialsService,l=t.customer;t.NovalPaymentApiCredentialsService.novalnetPayment(o,a,t.cartPrice.totalPrice,t.currency.isoCode,t.customer).then((function(e){if(""!=e&&null!=e&&"SUCCESS"==e.result.status&&""!=e.result.redirect_url&&null!=e.result.redirect_url){t.iframe.src=e.result.redirect_url,t.loaded=!0;var n=document.createElement("script");n.setAttribute("src","https://cdn.novalnet.de/js/pv13/checkout.js?"+(new Date).getTime()),n.type="text/javascript",document.head.appendChild(n),t.paymentformurl=n,t.paymentformurl.addEventListener("load",(function(){document.querySelector(".sw-button-process").disabled=!1,t.onWindowLoad(i,l)}))}})).catch((function(e){t.createNotificationError({message:"".concat(e.title,": ").concat(e.message)})}))}}))}}},customer:{deep:!0,handler:function(){this.customer},immediate:!0}},methods:{onWindowLoad:function(t,e){var n=new NovalnetPaymentForm,a=document.querySelector(".sw-button-process"),o={iframe:"#adminnovalnetPaymentiframe",initForm:{uncheckPayments:!1,showButton:!1}};n.initiate(o),n.validationResponse((function(t){n.initiate(o)})),n.selectedPayment((function(t){t.payment_details.type})),a.addEventListener("click",(function(a){a.preventDefault(),a.stopImmediatePropagation(),n.getPayment((function(n){var a=JSON.stringify(n);t.paymentValue(a,e).then((function(t){}))}))}))}}});n("Frls");var I=Shopware,x=I.Component,A=I.Mixin;Shopware.Utils.format.currency;x.register("novalnet-payment-refund-modal",{template:'{% block novalnet_payment_order_refund_modal %}\n \n\t\t\n\t\t\t{% block novalnet_payment_order_refund_modal_content %}\n\t\t\t\t\n\t\t\t{% endblock %}\n\n\t\t\t{% block novalnet_payment_order_refund_modal_actions %}\n\t\t\t\t\n\t\t\t{% endblock %}\n \n{% endblock %}\n',props:{refundableAmount:{type:Number,required:!0},order:{type:Object,required:!0},item:{type:Object,required:!0}},inject:["NovalPaymentApiCredentialsService","repositoryFactory"],mixins:[A.getByName("notification"),A.getByName("sw-inline-snippet")],data:function(){return{reason:"",disable:!1}},methods:{closeModal:function(){this.$emit("modal-close")},novalnetRefund:function(){var t=this,e=this.refundableAmount,n=this.reason,a=this.order.orderNumber;"0"!=e?(this.disable=!0,this.NovalPaymentApiCredentialsService.refundPayment(a,e,n,this.item.reference).then((function(e){null!=e.result&&null!=e.result?null!=e.result.status&&null!=e.result.status&&"SUCCESS"==e.result.status?t.createNotificationSuccess({message:t.$tc("novalnet-payment.settingForm.extension.refundSuccess")}):null!=e.result.status_text&&null!=e.result.status_text&&""!=e.result.status_text?t.createNotificationError({message:e.result.status_text}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.failureMessage")}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.failureMessage")}),t.$emit("modal-close"),setTimeout(t.$router.go,3e3)})).catch((function(e){t.createNotificationError({message:"".concat(e.title,": ").concat(e.message),autoClose:!1}),t.$emit("modal-close")}))):this.createNotificationError({message:this.$tc("novalnet-payment.settingForm.amountRefundError")})}}});var M=Shopware,F=M.Component,T=M.Mixin;Shopware.Utils.format.currency;F.register("novalnet-payment-manage-transaction-modal",{template:'{% block novalnet_payment_order_manage_modal %}\n \n\n {% block novalnet_payment_order_manage_modal_content %}\n \n {% endblock %}\n\n {% block novalnet_payment_order_manage_modal_actions %}\n \n {% endblock %}\n \n{% endblock %}\n',props:{status:{type:Number,required:!0},order:{type:Object,required:!0}},inject:["NovalPaymentApiCredentialsService","repositoryFactory"],mixins:[T.getByName("notification"),T.getByName("sw-inline-snippet")],data:function(){return{confirm:!0,cancel:!1,disable:!1}},methods:{closeModal:function(){this.$emit("modal-close")},novalnetOnhold:function(){var t=this,e=this.status,n=this.order.orderNumber;""!=e&&null!=e?(this.disable=!0,this.NovalPaymentApiCredentialsService.managePayment(n,e).then((function(n){""!=n?"SUCCESS"==n.result.status?100==e?t.createNotificationSuccess({message:t.$tc("novalnet-payment.settingForm.extension.onholdSuccess")}):t.createNotificationSuccess({message:t.$tc("novalnet-payment.settingForm.extension.onholdCancel")}):null!=n.result.status_text&&null!=n.result.status_text&&""!=n.result.status_text?t.createNotificationError({message:n.result.status_text}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.failureMessage")}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.failureMessage")}),t.$emit("modal-close"),setTimeout(t.$router.go,3e3)})).catch((function(e){t.createNotificationError({message:"".concat(e.title,": ").concat(e.message),autoClose:!1}),t.$emit("modal-close")}))):this.createNotificationError({message:this.$tc("novalnet-payment.settingForm.extension.onholdLabel")})}}});var E=Shopware,$=E.Component,B=E.Mixin;Shopware.Utils.format.currency;$.register("novalnet-payment-instalment-cancel-modal",{template:'{% block novalnet_payment_order_cancel_modal %}\n \n\n\t\t\t{% block novalnet_payment_order_cancel_modal_content %}\n\t\t\t\t\n\t\t\t{% endblock %}\n\n\t\t\t{% block novalnet_payment_order_cancel_modal_actions %}\n\t\t\t\t\n\t\t\t{% endblock %}\n \n{% endblock %}\n',props:{cancelType:{type:String,required:!0},order:{type:Object,required:!0}},inject:["NovalPaymentApiCredentialsService","repositoryFactory"],mixins:[B.getByName("notification"),B.getByName("sw-inline-snippet")],data:function(){return{disable:!1}},methods:{closeModal:function(){this.$emit("modal-close")},novalnetInstalmentCancel:function(){var t=this,e=this.order.orderNumber,n=this.cancelType;this.disable=!0,this.NovalPaymentApiCredentialsService.instalmentCancel(e,n).then((function(e){""!=e.result?null!=e.result.status&&null!=e.result.status&&"SUCCESS"==e.result.status?t.createNotificationSuccess({message:t.$tc("novalnet-payment.settingForm.extension.instalmentSuccessMsg")}):null!=e.result.status_text&&null!=e.result.status_text&&""!=e.result.status_text?t.createNotificationError({message:e.result.status_text}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.failureMessage")}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.failureMessage")}),t.$emit("modal-close"),setTimeout(t.$router.go,3e3)})).catch((function(e){t.createNotificationError({message:"".concat(e.title,": ").concat(e.message),autoClose:!1}),t.$emit("modal-close")}))}}});var R=Shopware,D=R.Component,O=R.Mixin;Shopware.Utils.format.currency;D.register("novalnet-payment-book-amount-modal",{template:'{% block novalnet_payment_order_refund_modal %}\n \n\t\t\n\t\t\t{% block novalnet_payment_order_zero_amount_modal_content %}\n\t\t\t\t\n\t\t\t{% endblock %}\n\n\t\t\t{% block novalnet_payment_order_zero_amount_modal_actions %}\n\t\t\t\t\n\t\t\t{% endblock %}\n \n{% endblock %}\n',props:{orderAmount:{type:Number,required:!0},order:{type:Object,required:!0}},inject:["NovalPaymentApiCredentialsService","repositoryFactory"],mixins:[O.getByName("notification"),O.getByName("sw-inline-snippet")],data:function(){return{reason:"",disable:!1}},methods:{closeModal:function(){this.$emit("modal-close")},novalnetBookAmount:function(){var t=this,e=this.orderAmount,n=this.order.orderNumber;0!=e?(this.disable=!0,this.NovalPaymentApiCredentialsService.BookOrderAmount(n,e).then((function(e){null!=e.result&&null!=e.result?null!=e.result.status&&null!=e.result.status&&"SUCCESS"==e.result.status?t.createNotificationSuccess({message:t.$tc("novalnet-payment.settingForm.extension.bookedSuccess")}):null!=e.result.status_text&&null!=e.result.status_text&&""!=e.result.status_text?t.createNotificationError({message:e.result.status_text}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.failureMessage")}):t.createNotificationError({message:t.$tc("novalnet-payment.settingForm.failureMessage")}),t.$emit("modal-close"),setTimeout(t.$router.go,3e3)})).catch((function(e){t.createNotificationError({message:"".concat(e.title,": ").concat(e.message),autoClose:!1}),t.$emit("modal-close")}))):this.createNotificationError({message:this.$tc("novalnet-payment.settingForm.amountError")})}}});var L=Shopware,j=L.Component,V=L.Mixin;Shopware.Data.Criteria;j.override("sw-order-user-card",{template:"{% block sw_order_detail_base_secondary_info_payment %}\n\t\t\n{% endblock %}\n",inject:["NovalPaymentApiCredentialsService","repositoryFactory"],mixins:[V.getByName("notification")],props:{currentOrder:{type:Object,required:!0},isLoading:{type:Boolean,required:!0}},data:function(){return{paymentMethod:""}},watch:{currentOrder:{deep:!0,handler:function(){var t=this;""!=this.currentOrder&&(null!=this.currentOrder.transactions.last().paymentMethod.customFields&&null!=this.currentOrder.transactions.last().paymentMethod.customFields.novalnet_payment_method_name&&"novalnetpay"==this.currentOrder.transactions.last().paymentMethod.customFields.novalnet_payment_method_name?this.NovalPaymentApiCredentialsService.getNovalnetPaymentMethod(this.currentOrder.orderNumber).then((function(e){null!=e&&null!=e&&null!=e.paymentName&&null!=e.paymentName?t.paymentMethod=e.paymentName:t.paymentMethod=t.currentOrder.transactions.last().paymentMethod.translated.distinguishableName})).catch((function(e){t.createNotificationError({message:"".concat(e.title,": ").concat(e.message)})})):this.paymentMethod=this.currentOrder.transactions.last().paymentMethod.translated.distinguishableName)},immediate:!0}}});var z=Shopware,U=z.Component,K=z.Mixin;Shopware.Data.Criteria;U.override("sw-order-general-info",{template:"{% block sw_order_detail_base_general_info_summary_sub_description %}\n\t
\n\t\t{{ $tc('sw-order.generalTab.info.summary.on') }}\n\t\t{{ order.orderDateTime | date({\n\t\t\thour: '2-digit',\n\t\t\tminute: '2-digit',\n\t\t\tday: '2-digit',\n\t\t\tmonth: '2-digit',\n\t\t\tyear: 'numeric'\n\t\t}) }}\n\t\t{{ $tc('sw-order.generalTab.info.summary.with') }}\n\t\t{{ paymentMethod }} \n\t\t\n\t
\n{% endblock %}\n",inject:["NovalPaymentApiCredentialsService","repositoryFactory"],mixins:[K.getByName("notification")],props:{order:{type:Object,required:!0}},data:function(){return{paymentMethod:""}},watch:{order:{deep:!0,handler:function(){var t=this;""!=this.order&&(null!=this.order.transactions.last().paymentMethod.customFields&&null!=this.order.transactions.last().paymentMethod.customFields.novalnet_payment_method_name&&"novalnetpay"==this.order.transactions.last().paymentMethod.customFields.novalnet_payment_method_name?this.NovalPaymentApiCredentialsService.getNovalnetPaymentMethod(this.order.orderNumber).then((function(e){null!=e&&null!=e&&null!=e.paymentName&&null!=e.paymentName?t.paymentMethod=e.paymentName:t.paymentMethod=t.order.transactions.last().paymentMethod.translated.distinguishableName})).catch((function(e){t.createNotificationError({message:"".concat(e.title,": ").concat(e.message)})})):this.paymentMethod=this.order.transactions.last().paymentMethod.translated.distinguishableName)},immediate:!0}}});var H=n("MAPO"),q=n("A7M2");function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"novalnet-payment";return Z(this,i),o.call(this,t,e,n)}return e=i,(n=[{key:"validateApiCredentials",value:function(t,e){return this.getBasicHeaders(),this.httpClient.post("_action/".concat(this.getApiBasePath(),"/validate-api-credentials"),{clientId:t,accessKey:e},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"getNovalnetAmount",value:function(t){return this.getBasicHeaders(),this.httpClient.post("_action/".concat(this.getApiBasePath(),"/transaction-amount"),{orderNumber:t},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"refundPayment",value:function(t,e,n,a){return this.getBasicHeaders(),this.httpClient.post("_action/".concat(this.getApiBasePath(),"/refund-amount"),{orderNumber:t,refundAmount:e,reason:n,instalmentCycleTid:a},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"managePayment",value:function(t,e){return this.getBasicHeaders(),this.httpClient.post("_action/".concat(this.getApiBasePath(),"/manage-payment"),{orderNumber:t,status:e},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"instalmentCancel",value:function(t,e){return this.getBasicHeaders(),this.httpClient.post("_action/".concat(this.getApiBasePath(),"/instalment-cancel"),{orderNumber:t,cancelType:e},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"BookOrderAmount",value:function(t,e){var n="_action/".concat(this.getApiBasePath(),"/book-amount");return this.httpClient.post(n,{orderNumber:t,bookAmount:e},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"getNovalnetPaymentMethod",value:function(t){var e="_action/".concat(this.getApiBasePath(),"/novalnet-paymentmethod");return this.httpClient.post(e,{orderNumber:t},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"configureWebhookUrl",value:function(t,e,n){var a="_action/".concat(this.getApiBasePath(),"/webhook-url-configure");return this.httpClient.post(a,{url:t,productActivationKey:e,paymentAccessKey:n},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"novalnetPayment",value:function(t,e,n,a,o){var i="_action/".concat(this.getApiBasePath(),"/load-payment-form");return this.httpClient.post(i,{shippingaddress:t,billingaddress:e,amount:n,currency:a,customer:o},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}},{key:"paymentValue",value:function(t,e){var n="_action/".concat(this.getApiBasePath(),"/payment-value-data");return this.httpClient.post(n,{value:t,customer:e},{headers:this.getBasicHeaders()}).then((function(t){return tt.handleResponse(t)}))}}])&&G(e.prototype,n),a&&G(e,a),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt),nt=Shopware.Application;nt.addServiceProvider("NovalPaymentApiCredentialsService",(function(t){var e=nt.getContainer("init");return new et(e.httpClient,t.loginService)}));n("zLbI")},FRSz:function(t,e,n){var a=n("Icig");a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("P8hj").default)("2907a316",a,!0,{})},Frls:function(t,e){var n=Shopware,a=n.Component,o=n.State,i=n.Mixin,l=(n.Filter,n.Context),s=(n.ContextSwitchParameters,Shopware.Data.Criteria);Shopware.Utils.format.currency;a.override("sw-order-create-general",{inject:["NovalPaymentApiCredentialsService","repositoryFactory","acl"],mixins:[i.getByName("notification")],data:function(){return{isLoading:!1}},computed:{customer:function(){return o.get("swOrder").customer},cart:function(){return o.get("swOrder").cart},currency:function(){return o.get("swOrder").context.currency},cartPrice:function(){return this.cart.price},salesChannelContext:function(){return o.get("swOrder").context}},watch:{salesChannelContext:{deep:!0,handler:function(){var t=this;if(this.customer){this.isLoading=!0;var e=this.repositoryFactory.create("payment_method"),n=new s(1,1);n.addFilter(s.equals("id",this.salesChannelContext.paymentMethod.id)),e.search(n,l.api).then((function(e){var n=e.first();n&&(t.novalnetPayment=!1,null!=n.customFields&&"novalnetpay"==n.customFields.novalnet_payment_method_name&&t.onWindowLoad())}))}}},customer:{deep:!0,handler:function(){this.customer},immediate:!0}},methods:{onWindowLoad:function(){document.querySelector(".sw-button-process").disabled=!0}}})},Icig:function(t,e,n){},MAPO:function(t){t.exports=JSON.parse('{"novalnet-payment":{"module":{"title":"Novalnet","description":"PCI-konforme und lückenlose Integration mit verschiedenen Zahlungsarten und Zahlungsdienstleistungen auf einer Plattform.","projectInfo":"Ihr Projekt befindet sich im Testmodus","comments":"Kommentare","generalInfo":"Bevor Sie beginnen, lesen Sie bitte die Installationsanleitung und melden Sie sich mit Ihrem Händlerkonto im Novalnet Admin-Portal an. Um ein Händlerkonto zu erhalten, senden Sie bitte eine E-Mail an sales@novalnet.de oder rufen Sie uns unter +49 89 923068320 an","globalTitle":"Konfigurationseinstellungen","installationInfo":"Für die Einrichtung und Verwendung des Plugins finden Sie die Installationsanleitung Here","PaymentConfiguration":"Wichtiger Hinweis:Die Konfiguration der Zahlungsplugins sind jetzt im Novalnet Admin Portal verfügbar. Navigieren Sie zu Projekts > Wählen Sie Ihr Projekt > Konfiguration des Zahlungsplugins, um sie zu konfigurieren.

Novalnet ermöglicht es Ihnen, das Verhalten der Zahlungsmethode zu überprüfen, bevor Sie in den Produktionsmodus gehen, indem Sie Testzahlungsdaten verwenden. Zugang zu den Novalnet-Testzahlungsdaten finden Sie Hier "},"settingForm":{"title":"Novalnet","statusTitle":"Zustand","amountError":"Ungültiger Betrag","buttons":{"save":"Speichern"},"credentials":{"cardTitle":"Novalnet API-Konfiguration","activationKey":{"label":"Aktivierungsschlüssel des Produkts *","tooltipText":"Ihr Produktaktivierungsschlüssel ist ein eindeutiger Token für die Händlerauthentifizierung und Zahlungsabwicklung.Ihr Produktaktivierungsschlüssel ist ein eindeutiges Token für die Händlerauthentifizierung und Zahlungsabwicklung. Ihren Produktaktivierungsschlüssel finden Sie im Novalnet Admin-Portal : Projekts > Wählen Sie Ihr Projekt > API-Anmeldeinformationen > API-Signatur (Produktaktivierungsschlüssel)"},"accessKey":{"label":"Zahlungs-Zugriffsschlüssel *","tooltipText":"Ihr geheimer Schlüssel zur Verschlüsselung der Daten, um Manipulation und Betrug zu vermeiden. Ihren Paymentzugriffsschlüssel finden Sie im Novalnet Admin-Portal : Projekts > Wählen Sie Ihr Projekt > API-Anmeldeinformationen > Paymentzugriffsschlüssel"},"tariff":{"label":"Auswahl der Tarif-ID *","tooltipText":"Wählen Sie eine Tarif-ID, die dem bevorzugten Tarifplan entspricht, den Sie im Novalnet Admin-Portal für dieses Projekt erstellt haben","emptyText":"Tarif-ID auswählen"},"orderEmailMode":{"label":" Bestellbestätigung per E-Mail aktivieren","tooltipText":"Aktivieren Sie diesen Reiter, um eine weitere Bestellbestätigungs-E-Mail mit Novalnet-Transaktionsdetails an den Endkunden für Bestellungen zu senden, die über Rechnung, Rechnung mit Zahlungsgarantie,Lastschrift SEPA mit Zahlungsgarantie, Ratenzahlung per Rechnung,Ratenzahlung per SEPA-Lastschrift, Vorkasse, Barzahlen oder Multibanco getätigt wurden. (Standardmäßig wird die erste Bestellbestätigungs-E-Mail an Endkunden ohne Novalnet-Transaktionsdetails gesendet.)"},"onHold":{"label":"Status für on-hold-Zahlungen","tooltipText":"Status, der verwendet wird, wenn die Zahlung autorisieren."},"complete":{"label":"Status für eingegangene Zahlungen","tooltipText":"Status, der verwendet wird, wenn die Zahlung erfolgreich abgeschlossen ist."}},"merchantSettings":{"cardTitle":"Benachrichtigungs- / Webhook-URL festlegen","deactivateIp":{"label":"Manuelles Testen der Benachrichtigungs / Webhook-URL erlauben","tooltipText":"Aktivieren Sie diese Option, um die Novalnet-Benachrichtigungs-/Webhook-URL manuell zu testen. Deaktivieren Sie die Option, bevor Sie Ihren Shop liveschalten, um unautorisierte Zugriffe von Dritten zu blockieren."},"mailTo":{"label":"E-Mails senden an","tooltipText":"E-Mail-Benachrichtigungen werden an diese E-Mail-Adresse gesendet"},"callbackUrl":{"label":"Benachrichtigungs- / Webhook-URL","button":"Konfigurieren","tooltipText":"Sie müssen die folgende Webhook-URL im Novalnet Admin-Portal hinzufügen. Dadurch können Sie Benachrichtigungen über den Transaktionsstatus erhalten."}},"extension":{"paidTooltip":"Gezahlter Gesamtbetrag","refundTooltip":"Rückerstatteter Betrag","refundButton":"Rückerstattung","amountTitle":"Rückerstattungsbetrag","refundDescription":"Geben Sie bitte den erstatteten Betrag ein (in der kleinsten Währungseinheit, z.B. 100 Cent = entsprechen 1.00 EUR)","refundReference":"Grund der Rückerstattung/Stornierung","confirmLabel":"Bestätigen","cancelLabel":"Stornieren","cancelAllCycleMessage":"Sind Sie sicher, dass Sie alle Ratenzahlungen stornieren wollen?","cancelRemainingCycleMessage":"Sind Sie sicher, dass Sie die verbleibende Zyklusrate stornieren möchten?","Managetitle":"Transaktion verwalten","confirmMessage":"Sind Sie sicher, dass Sie die Zahlung einziehen möchten?","cancelMessage":"Sind Sie sicher, dass Sie die Zahlung stornieren wollen?","refundSuccess":"Die Rückerstattung war erfolgreich.","onholdSuccess":"Die Transaktion wurde bestätigt","onholdCancel":"Die Transaktion wurde storniert","instalmentCancelLabel":"Ratenzahlung Stornieren","instalmentAllCancelLabel":"Gesamte Ratenzahlung stornieren","instalmentRemainCancelLabel":"Alle übrigen Installationen abbrechen","instalmentSuccessMsg":"Die Ratenzahlung wurde erfolgreich abgebrochen.","zeroAmountButton":"Buchbetrag","bookedSuccess":"Ihr gebuchter Betrag war erfolgreich.","zeroAmountTitle":"Buchungsbetrag der Transaktion","zeroAmountDescription":"Bitte geben Sie den Betrag ein (in der kleinsten Währungseinheit, z.B. 100, was 1,00 entspricht)","bookButton":"Buchen Sie"},"titleSuccess":"Success","successMessage":"Die Novalnet-Händlerdaten wurden erfolgreich eingestellt.","titleError":"Error","apiFailureMessage":"Konfigurieren Sie bitte die zentralen Novalnet-Einstellungen","customerFailureMessage":"Bitte wählen Sie Ihren Kunden","currencyFailureMessage":"Bitte wählen Sie eine Währung","lineitemFailureMessage":"Bitte Produkt hinzufügen","amountRefundError":"Ungültiger Rückerstattungsbetrag","failureMessage":"Bitte füllen Sie die erforderlichen Felder aus","instalmentNumber":"S.Nr","instalmentReference":"Novalnet-Transaktions-ID","instalmentDate":"Nächste Rate fällig am","instalmentAmount":"Betrag","instalmentStatus":"Status","instalmentInfo":"Zusammenfassung der Ratenzahlung","webhookUrlFailure":"Bitte geben Sie eine gültige Webhook-URL ein","webhookUrlSuccess":"Callbackskript-/ Webhook-URL wurde erfolgreich im Novalnet Admin Portal konfiguriert","emptyMessage":"Aktivierungsschlüssel für das Produkt eingeben"},"onhold":{"open":"Offen","process":"In Bearbeitung","authorized":"Autorisiert","cancel":"Abgebrochen","failed":"Fehlgeschlagen","unconfirmed":"Unbestätigt","paidPartially":"Bezahlt (teilweise)","paid":"Bezahlt","select":"--Bitte auswählen--"}},"sw-privileges":{"permissions":{"novalnet_extension":{"label":"Novalnet-Erweiterungen"},"parents":{"novalnet_payment":"Novalnet"},"novalnet_payment":{"label":"Novalnet Einstellungen"}}}}')},P8hj:function(t,e,n){"use strict";function a(t,e){for(var n=[],a={},o=0;on.parts.length&&(a.parts.length=n.parts.length)}else{var l=[];for(o=0;o tag\n\n// load the styles\nvar content = require(\"!!../../../../../../../../../../../../vendor/shopware/administration/Resources/app/administration/node_modules/mini-css-extract-plugin/dist/loader.js??ref--15-1!../../../../../../../../../../../../vendor/shopware/administration/Resources/app/administration/node_modules/css-loader/dist/cjs.js??ref--15-2!../../../../../../../../../../../../vendor/shopware/administration/Resources/app/administration/node_modules/sass-loader/dist/cjs.js??ref--15-3!./novalnet-payment-credentials.scss\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../../../../../../../../../vendor/shopware/administration/Resources/app/administration/node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"61be6ccd\", content, true, {});","export default \"{% block novalnet_payment_settings %}\\n \\n {% block novalnet_payment_settings_header %}\\n \\n {% endblock %}\\n \\n {% block novalnet_payment_settings_actions %}\\n \\n {% endblock %}\\n \\n {% block novalnet_payment_content %}\\n\\t\\t\\t\\n\\t\\t\\t\\n {% endblock %} \\n \\n \\n{% endblock %}\\n\";","import template from './novalnet-payment-settings.html.twig';\nimport './novalnet-payment-settings.scss';\n\n\nconst { Component, Mixin, Defaults, Context} = Shopware;\nconst { Criteria } = Shopware.Data;\n\nComponent.register('novalnet-payment-settings', {\n template,\n\n mixins: [\n Mixin.getByName('notification'),\n Mixin.getByName('sw-inline-snippet')\n ],\n\n inject: [\n 'repositoryFactory',\n 'NovalPaymentApiCredentialsService',\n 'acl',\n ],\n\n\n data() {\n return {\n isLoading: false,\n isValidating: false,\n isSaveSuccessful: false,\n isValidateSuccessful: false,\n clientIdFilled: false,\n clientSecretFilled: false,\n config: {},\n salesChannels: []\n \n };\n },\n\n computed: {\n\n validateButtonDisabled() {\n return this.isLoading || this.isValidating;\n },\n \n novalnetConfigRoute() {\n return {\n name: 'novalnet.payment.detail.credentials'\n };\n },\n salesChannelRepository() {\n return this.repositoryFactory.create('sales_channel');\n }\n },\n \n created() {\n this.createdComponent();\n },\n \n watch: {\n config: {\n\t\t\tdeep: true,\n handler() {\n\t\t\t\t\n const defaultConfig = this.$refs.configComponent.allConfigs.null;\n const salesChannelId = this.$refs.configComponent.selectedSalesChannelId;\n\n if (salesChannelId === null) {\n this.clientIdFilled = !!this.config['NovalnetPayment.settings.clientId'];\n } else {\n this.clientIdFilled = !!this.config['NovalnetPayment.settings.clientId']\n || !!defaultConfig['NovalnetPayment.settings.clientId'];\n this.clientSecretFilled = !!this.config['NovalnetPayment.settings.clientSecret'];\n }\n \n },\n \n },\n \n },\n \n\tmethods: {\n\tcreatedComponent() {\n this.isLoading = true;\n const criteria = new Criteria();\n criteria.addFilter(Criteria.equalsAny('typeId', [\n Defaults.storefrontSalesChannelTypeId,\n Defaults.apiSalesChannelTypeId\n ]));\n this.salesChannelRepository.search(criteria, Shopware.Context.api).then(res => {\n res.add({\n id: null,\n translated: {\n name: this.$tc('sw-sales-channel-switch.labelDefaultOption')\n }\n });\n this.salesChannels = res;\n }).finally(() => {\n this.isLoading = false;\n });\n },\n onSave() {\n\t\t\tthis.isSaveSuccessful = false;\n this.isLoading = true;\n \n const clientId = this.getConfigValue('clientId');\n const accessKey = this.getConfigValue('accessKey');\n \n if(this.getConfigValue('clientId') !== '' && typeof (this.getConfigValue('clientId')) !== 'undefined')\n {\n\t\t\t\tconst clientId = this.getConfigValue('clientId').replace(/\\s/g, \"\");\n\t\t\t}\n\t\t\t\n\t\t\tif(this.getConfigValue('accessKey') !== '' && typeof (this.getConfigValue('accessKey')) !== 'undefined')\n {\n\t\t\t\tconst clientId = this.getConfigValue('accessKey').replace(/\\s/g, \"\");\n\t\t\t}\n \n\n\t\t\tif (typeof (clientId) === 'undefined' || clientId == '')\n\t\t\t{\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('novalnet-payment.settingForm.titleError'),\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.emptyMessage')\n\t\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t} else if(typeof (accessKey) === 'undefined' || accessKey == '') {\n\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('novalnet-payment.settingForm.titleError'),\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.emptyAccessKeyMessage')\n\t\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.checkBackendConfiguration();\n\t\t},\t\n\t\t\n getConfigValue(field) {\n const defaultConfig = this.$refs.configComponent.allConfigs.null;\n const salesChannelId = this.$refs.configComponent.selectedSalesChannelId;\n\n if (salesChannelId === null) {\n return this.config[`NovalnetPayment.settings.${field}`];\n }\n\n return this.config[`NovalnetPayment.settings.${field}`]\n || defaultConfig[`NovalnetPayment.settings.${field}`];\n },\n \n checkBackendConfiguration() {\n\t\t\tconst me = this;\n\t\t\tconst clientId = this.getConfigValue('clientId').replace(/\\s/g, \"\");\n\t\t\tconst accessKey = this.getConfigValue('accessKey').replace(/\\s/g, \"\");\n\n\t\t\tthis.NovalPaymentApiCredentialsService.validateApiCredentials(clientId, accessKey).then((response) => {\n this.isLoading = false;\n\n if(response.serverResponse == undefined || response.serverResponse == '')\n {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('novalnet-payment.settingForm.titleError'),\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.apiFailureMessage')\n\t\t\t\t\t});\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n const status = response.serverResponse.result.status_code;\n if(status != 100)\n {\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('novalnet-payment.settingForm.titleError'),\n\t\t\t\t\t\t\tmessage: response.serverResponse.result.status_text\n\t\t\t\t\t});\n\n\t\t\t\t\treturn;\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\tresponse.tariffResponse.forEach(((tariff) => {\n\t\t\t\t\t\tif(this.config['NovalnetPayment.settings.tariff'] == undefined || this.config['NovalnetPayment.settings.tariff'] == '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.config['NovalnetPayment.settings.tariff'] = tariff.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\n\t\t\t\t\tthis.config['NovalnetPayment.settings.clientKey']\t= response.serverResponse.merchant.client_key;\n \t\t\t\t\tthis.$refs.configComponent.save().then((res) => {\n\t\t\t\t\t\t\tthis.isSaveSuccessful = true;\n\n\t\t\t\t\t\t\tif (res) {\n\t\t\t\t\t\t\t\tthis.config = res;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}).catch(() => {\n\t\t\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\t});\n\n this.createNotificationSuccess({\n title: this.$tc('novalnet-payment.settingForm.titleSuccess'),\n message: this.$tc('novalnet-payment.settingForm.successMessage')\n });\n\n\t\t\t\t\treturn;\n }\n }).catch((errorResponse) => {\n this.createNotificationError({\n title: this.$tc('novalnet-payment.settingForm.titleError'),\n message: this.$tc('novalnet-payment.settingForm.errorMessage')\n });\n this.isLoading = false;\n this.isTestSuccessful = false;\n });\n\t\t},\n\n\t},\n metaInfo() {\n return {\n title: this.$createTitle()\n };\n },\n});\n","import template from './novalnet-payment-credentials.html.twig';\nimport './novalnet-payment-credentials.scss';\n\nconst { Component, Mixin } = Shopware;\nconst { Criteria } = Shopware.Data;\nconst { object, types } = Shopware.Utils;\n\nComponent.register('novalnet-payment-credentials', {\n template,\n\n\tmixins: [\n Mixin.getByName('notification'),\n Mixin.getByName('sw-inline-snippet')\n ],\n\n\tname: 'NovalnetPaymentCredentials',\n\ticon: 'default-action-settings',\n\n\tprops: {\n actualConfigData: {\n type: Object,\n required: true\n },\n allConfigs: {\n type: Object,\n required: true\n },\n selectedSalesChannelId: {\n required: true\n },\n domain: {\n type: String,\n required: true,\n default: ''\n }\n },\n\n data() {\n\t\tconst url = window.location .protocol + \"//\" + window.location.host + window.location.pathname;\n\t\tconst generatedUrl = url.split(\"/admin\").join(\"\");\n return {\n\t\t\tallConfigs: {},\n\t\t\tconfig: {},\n\t\t\ttariffOptions: [],\n\t\t\tonHoldOptions: [],\n\t\t\tcompleteOptions: [],\n\t\t\tactualConfigData: {},\n\t\t\tshouldDisable: false,\n\t\t\tprojectMode: false,\n\t\t\tapiActivationKey: '',\n\t\t\tpaymentAccessKey: '',\n\t\t\ttariffId: '',\n\t\t\tisLoading: false,\n\t\t\tisRequested : '',\n\t\t\tshowMessage: false,\n\t\t\tbuttonLoad: false,\n\t\t\tNovalnetPaymentCallBackUrl : generatedUrl + \"/novalnet/callback\",\n\t\t\tgeneralInformation: this.$tc('novalnet-payment.module.generalInfo'),\n\t\t\tPaymentConfiguration: this.$tc('novalnet-payment.module.PaymentConfiguration'),\n\t\t\tonhold: 'authorized',\n\t\t\tcompleted: 'paid',\n\t\t\tcompleteStatusId: '',\n\t\t\tonHoldStatusId: ''\n\t\t}\n\t},\n\n\tinject: [\n 'repositoryFactory',\n 'NovalPaymentApiCredentialsService',\n 'systemConfigApiService',\n 'acl',\n ],\n\n watch: {\n actualConfigData: {\n handler(configData) {\n if (!configData) {\n return;\n }\n\n this.$emit('input', configData);\n },\n deep: true\n },\n },\n\n computed: {\n actualConfigData: {\n get() {\n return this.allConfigs[this.selectedSalesChannelId];\n },\n set(config) {\n this.allConfigs = {\n ...this.allConfigs,\n [this.selectedSalesChannelId]: config\n };\n }\n },\n },\n\n\tcreated() {\n\t\tthis.createdComponent();\n },\n\n updated() {\n\t\tthis.createdComponent();\n\t},\n\n methods: {\n checkTextFieldInheritance(value) {\n if (typeof value !== 'string') {\n return true;\n }\n\n return value.length <= 0;\n },\n\n checkBoolFieldInheritance(value) {\n return typeof value !== 'boolean';\n },\n\n checkNumberFieldInheritance(value) {\n return typeof value !== 'int';\n },\n\t\tonCheckApi() {\n\t\t\tif(event.target.name === 'NovalnetPayment.settings.clientId') {\n\t\t\t\tthis.apiActivationKey = this.actualConfigData['NovalnetPayment.settings.clientId'] = event.target.value;\n\t\t\t} else if(event.target.name === 'NovalnetPayment.settings.accessKey') {\n\t\t\t\tthis.paymentAccessKey = this.actualConfigData['NovalnetPayment.settings.accessKey'] = event.target.value;\n\t\t\t}\n\n\t\t\tif (this.apiActivationKey === '' && this.paymentAccessKey === '')\n\t\t\t{\n\n\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('novalnet-payment.settingForm.titleError'),\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.apiFailureMessage')\n\t\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.isRequested = '';\n\t\t\tthis.showMessage = true;\n\t\t\tthis.createdComponent();\n\t\t},\n \n createdComponent() {\n\t\t\tconst me = this;\n\t\t\tif(this.actualConfigData !== undefined && this.isRequested !== this.selectedSalesChannelId)\n\t\t\t{\n\t\t\t\tthis.isRequested\t\t= this.selectedSalesChannelId;\n\t\t\t\tthis.apiActivationKey\t= this.actualConfigData['NovalnetPayment.settings.clientId'] || this.allConfigs.null['NovalnetPayment.settings.clientId'];\n\t\t\t\tthis.paymentAccessKey\t= (this.actualConfigData['NovalnetPayment.settings.accessKey'] || this.allConfigs.null['NovalnetPayment.settings.accessKey']);\n\t\t\t\tthis.onHoldId\t= this.actualConfigData['NovalnetPayment.settings.onHoldStatus'] || this.allConfigs.null['NovalnetPayment.settings.onHoldStatus'];\n\t\t\t\tthis.completeId\t= (this.actualConfigData['NovalnetPayment.settings.completeStatus'] || this.allConfigs.null['NovalnetPayment.settings.completeStatus']);\n\t\t\t\t\n\t\t\t\tif(this.onHoldStatusId === undefined || this.onHoldStatusId === '')\n\t\t\t\t{\n\t\t\t\t\tthis.onHoldStatusId = 'authorized';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(this.completeStatusId === undefined || this.completeStatusId === '')\n\t\t\t\t{\n\t\t\t\t\tthis.completeStatusId = 'paid';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(this.apiActivationKey !== undefined && this.apiActivationKey !== '' && this.paymentAccessKey !== undefined && this.paymentAccessKey !== '' )\n\t\t\t\t{\n this.apiActivationKey = this.apiActivationKey.replace(/\\s/g, \"\");\n this.paymentAccessKey = this.paymentAccessKey.replace(/\\s/g, \"\");\n\t\t\t\t\tthis.isLoading = true;\n\t\t\t\t\tthis.NovalPaymentApiCredentialsService.validateApiCredentials(this.apiActivationKey, this.paymentAccessKey).then((response) => {\n\t\t\t\t\t\tconst status = response.serverResponse.result.status_code;\n\t\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\t\tif(status !== 100)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(this.showMessage === true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\t\t\ttitle: this.$tc('novalnet-payment.settingForm.titleError'),\n\t\t\t\t\t\t\t\t\tmessage: response.serverResponse.result.status_text,\n\t\t\t\t\t\t\t\t\tautoClose: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.showMessage = false;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tme.tariffOptions = [];\n\t\t\t\t\t\t\tresponse.tariffResponse.forEach(((tariff) => {\n\n\t\t\t\t\t\t\t\tthis.actualConfigData['NovalnetPayment.settings.clientKey']\t= response.serverResponse.merchant.client_key;\n\n\t\t\t\t\t\t\t\tme.tariffOptions.push({\n\t\t\t\t\t\t\t\t\tvalue: tariff.id,\n\t\t\t\t\t\t\t\t\tlabel: tariff.name\n\t\t\t\t\t\t\t\t});\n\n if(this.tariffId === undefined || this.tariffId === '')\n {\n this.tariffId = tariff.id;\n }\n\n\t\t\t\t\t\t\t\tif(this.showMessage === true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\t\t\t\t\ttitle: this.$tc('novalnet-payment.settingForm.titleSuccess'),\n\t\t\t\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.successMessage'),\n\t\t\t\t\t\t\t\t\t\tautoClose: true\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tthis.showMessage = false;\n\t\t\t\t\t\t\t\tif(response.serverResponse.merchant.test_mode === 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.projectMode = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\t\tthis.isLoading = false;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.onHoldOptions = [\n\t\t\t\t{\n value: 'open',\n label: this.$tc('novalnet-payment.onhold.open')\n },\n {\n value: 'process',\n label: this.$tc('novalnet-payment.onhold.process')\n },\n {\n value: 'authorized',\n label: this.$tc('novalnet-payment.onhold.authorized')\n },\n {\n value: 'cancel',\n label: this.$tc('novalnet-payment.onhold.cancel')\n },\n {\n value: 'failed',\n label: this.$tc('novalnet-payment.onhold.failed')\n }]; \n \n this.completeOptions = [\n \n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: 'paid',\n\t\t\t\t\t\tlabel: this.$tc('novalnet-payment.onhold.paid')\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: 'paidPartially',\n\t\t\t\t\t\tlabel: this.$tc('novalnet-payment.onhold.paidPartially')\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: 'cancel',\n\t\t\t\t\t\tlabel: this.$tc('novalnet-payment.onhold.cancel')\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: 'failed',\n\t\t\t\t\t\tlabel: this.$tc('novalnet-payment.onhold.failed')\n\t\t\t\t\t}\n\t\t\t\t];\n\t\t},\n\t\t\n\t\tconfigureWebhookUrl() {\n\t\t\tconst productActivationKey\t= this.apiActivationKey || this.actualConfigData['NovalnetPayment.settings.clientKey'];\n\t\t\tconst accessKey\t\t\t\t= this.paymentAccessKey || this.actualConfigData['NovalnetPayment.settings.accessKey'];\n\n\t\t\tif ( productActivationKey === undefined || productActivationKey === '' || accessKey === undefined || accessKey === '')\n\t\t\t{\n\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\ttitle: this.$tc('novalnet-payment.settingForm.titleError'),\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.apiFailureMessage')\n\t\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif( this.NovalnetPaymentCallBackUrl)\n\t\t\t{\n\t\t\t\tif (/^(http|https):\\/\\/[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,}(:[0-9]{1,5})?(\\/.*)?$/i.test(this.NovalnetPaymentCallBackUrl) === false)\n\t\t\t\t{\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.webhookUrlFailure')\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.buttonLoad = true;\n\n\t\t\t\tthis.NovalPaymentApiCredentialsService.configureWebhookUrl(this.NovalnetPaymentCallBackUrl, productActivationKey, accessKey).then((response) => {\n\n\t\t\t\t\t\tif(response.result.status !== undefined && response.result.status != null && response.result.status !== '' && response.result.status === 'SUCCESS')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.webhookUrlSuccess')\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if(response.result.status_text !== undefined && response.result.status_text != null && response.result.status_text !== '') {\n\t\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\t\tmessage: response.result.status_text,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.webhookUrlFailure')\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\tthis.buttonLoad = false;\n\n\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\tthis.buttonLoad = false;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n \n }\n\n});\n","export default \"{% block novalnet_payment_content_card_channel_config_credentials %}\\n\\n\\t
\\n\\t\\t\\n\\n\\t\\t\\t{% block novalnet_payment_content_card_channel_config_credentials_card_container %}\\n\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\t{% block novalnet_payment_content_card_channel_config_credentials_card_container_settings %}\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t{{ $tc('novalnet-payment.module.projectInfo') }}\\n\\t\\t\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t
\\n\\n\\t\\t\\t\\t\\t\\t\\t{% block novalnet_payment_content_card_channel_config_credentials_card_container_settings_client_id %}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t{% endblock %}\\n\\t\\t\\t\\t\\t\\t\\t{% block novalnet_payment_content_card_channel_config_credentials_card_container_settings_break %}\\n\\t\\t\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\t{% endblock %}\\n\\n\\t\\t\\t\\t\\t\\t\\t{% block novalnet_payment_content_card_channel_config_credentials_card_container_settings_client_secret %}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t{% endblock %}\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{% endblock %}\\n\\n\\t\\t\\t\\t\\t{% block novalnet_payment_content_card_loading %}\\n \\n {% endblock %}\\n\\n\\t\\t\\t\\t
\\n\\t\\t\\t{% endblock %}\\n\\t\\t
\\n\\t{% endblock %}\\n\\t{% block novalnet_payment_content_card_channel_config_merchant_credentials %}\\n\\t\\t\\n\\t\\t\\t{% block novalnet_payment_content_card_channel_config_merchant_credentials_card_container %}\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% block novalnet_payment_content_card_channel_config_merchant_credentials_card_container_settings %}\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\t\\t{% block novalnet_payment_content_card_channel_config_merchant_credentials_card_container_settings_ip %}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{{ $tc('novalnet-payment.settingForm.merchantSettings.callbackUrl.button') }}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t{% endblock %}\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{% endblock %}\\n\\t\\t\\t\\t
\\n\\t\\t\\t{% endblock %}\\n\\t\\t
\\n\\t
\\n
\\n{% endblock %}\\n\";","import template from './novalnet-payment-settings-icon.html.twig';\n\nconst { Component } = Shopware;\n\nComponent.register('novalnet-payment-settings-icon', {\n template\n});\n","export default \"{% block novalnet_payment_settings_icon %}\\n \\\"\\\"\\n{% endblock %}\\n\";","export default \"{% block sw_order_detail_details_payment %}\\n\\t\\n\\t\\n\\t\\n\\n \\n {% block sw_order_detail_details_payment_billing_address %}\\n \\n {% endblock %}\\n\\n \\n {% block sw_order_detail_details_payment_method_select %}\\n \\n\\t\\t\\t{% if paymentMethod !='' %}\\n\\t\\t\\t\\t \\n\\t\\t\\t\\t\\n\\t\\t\\t{% else %}\\n\\t\\t\\t\\t\\n\\t\\t\\t{% endif %}\\t\\n \\n {% endblock %}\\n\\n \\n \\n\\t\\n\\t{% block sw_order_detail_details_payment_novalnet_seaction %}\\n\\t\\t\\n\\t\\t\\n\\t{% endblock %}\\n{% endblock %}\\n\";","import template from './sw-order-detail-details.html.twig';\nimport './sw-order-detail-details.scss';\n\nconst { Context, Component, Filter, Utils } = Shopware;\nconst { Criteria } = Shopware.Data;\nconst { currency } = Shopware.Utils.format;\n\nComponent.override('sw-order-detail-details', {\n template,\n \n inject: [\n 'NovalPaymentApiCredentialsService',\n 'repositoryFactory',\n 'acl',\n ],\n \n mixins: ['notification'],\n \n props: {\n orderId: {\n type: String,\n required: true\n },\n paymentDetails: {\n type: Object,\n required: true\n },\n },\n \n data() {\n return {\n\t\t\tstatus: 0,\n\t\t\tdisplayPaidAmount: 0,\n\t\t\trefundedAmount: 0,\n\t\t\torderAmount : 0,\n\t\t\tdisplayOrderAmount : 0,\n\t\t\tInstalmentInfo: [],\n\t\t\titem: {},\n\t\t\tnovalnetComments: '',\n\t\t\tisNovalnetPayment: false,\n\t\t\trefundModalVisible: false,\n\t\t\tconfirmModalVisible: false,\n\t\t\tzeroAmountVisible: false,\n\t\t\tcancelModalVisible: false,\n\t\t\tcanInstalmentAllCancel: false,\n\t\t\tcanInstalmentRemainCancel: false,\n\t\t\tinstalmentRefundModalVisible: false,\n\t\t\tcanCaptureVoid: false,\n\t\t\tcanRefund: false,\n\t\t\tcanZeroAmountBooking: false,\n\t\t\tcanInstalmentCancel: false,\n\t\t\tcanInstalmentShow: false,\n\t\t\tinstalmentRefundAmount : 0,\n\t\t\tpaymentMethod: '',\n\t\t\tpayLater: [\n 'INVOICE',\n\t\t\t\t'CASHPAYMENT',\n\t\t\t\t'MULTIBANCO',\n\t\t\t\t'PREPAYMENT'\n ],\n instalmentPayments: [\n 'INSTALMENT_INVOICE',\n\t\t\t\t'INSTALMENT_DIRECT_DEBIT_SEPA'\n ],\n onholdStatus: ['91', '99', '98', '85']\n\t\t}\n\t},\n \n computed: {\n\n getInstalmentColums() {\n const columnDefinitions = [{\n property: 'number',\n dataIndex: 'number',\n label: this.$tc('novalnet-payment.settingForm.instalmentNumber'),\n width: '50px'\n }, \n {\n property: 'reference',\n dataIndex: 'reference',\n label: this.$tc('novalnet-payment.settingForm.instalmentReference'),\n width: '120px'\n },\n {\n property: 'amount',\n dataIndex: 'amount',\n label: this.$tc('novalnet-payment.settingForm.instalmentAmount'),\n width: '80px'\n }, {\n property: 'totalAmount',\n dataIndex: 'totalAmount',\n visible: false\n },\n {\n property: 'refundAmount',\n dataIndex: 'refundAmount',\n visible: false\n },{\n property: 'nextCycle',\n dataIndex: 'nextCycle',\n label: this.$tc('novalnet-payment.settingForm.instalmentDate'),\n width: '120px'\n }, {\n property: 'status',\n dataIndex: 'status',\n label: this.$tc('novalnet-payment.settingForm.instalmentStatus'),\n width: '80px'\n }];\n\n return columnDefinitions;\n }\n },\n\t\n\twatch: {\n orderId: {\n deep: true,\n handler() {\n if (!this.orderId) {\n this.setNovalnetPayment(false);\n return;\n }\n\n const orderRepository = this.repositoryFactory.create('order');\n const orderCriteria = new Criteria(1, 1);\n orderCriteria.addAssociation('transactions');\n orderCriteria.addAssociation('currency');\n\n orderCriteria.addFilter(Criteria.equals('id', this.orderId));\n\n orderRepository.search(orderCriteria, Context.api).then((searchResult) => {\n const order = searchResult.first();\n\n if (!order) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!this.identifier) {\n\t\t\t\t\t\tthis.identifier = order.orderNumber;\n\t\t\t\t\t}\n\t\t\t\t\tlet isNovalnet = false;\n\t\t\t\t\tlet comments = '';\n\t\t\t\t\tlet translation = this.$tc('novalnet-payment.module.comments');\n\n\t\t\t\t\torder.transactions.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt) ).forEach((orderTransaction) => {\n\t\t\t\t\t\tif (orderTransaction.customFields &&\n\t\t\t\t\t\t\torderTransaction.customFields.novalnet_comments\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.stateMachineState = orderTransaction.stateMachineState.name;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisNovalnet = true;\n\t\t\t\t\t\t\tif(comments != '')\n {\n\t\t\t\t\t\t\t\tcomments += \"
\" + translation + \"
\";\n\t\t\t\t\t\t\t}\n comments += orderTransaction.customFields.novalnet_comments.split(\"/ \").join(\"
\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif( isNovalnet ) {\n\t\t\t\t\t\tthis.novalnetComments = comments.split(\"&&\").join(\"
\" + translation + \"
\");\n\t\t\t\t\t\tthis.setNovalnetPayment(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.setNovalnetPayment(false);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.order.transactions.last().paymentMethod.customFields != null && this.order.transactions.last().paymentMethod.customFields.novalnet_payment_method_name != undefined && this.order.transactions.last().paymentMethod.customFields.novalnet_payment_method_name == \"novalnetpay\") {\n\n\t\t\t\t\t\tthis.NovalPaymentApiCredentialsService.getNovalnetPaymentMethod(this.order.orderNumber).then((payment) => {\n\t\t\t\t\t\t\t\tif(payment != undefined && payment != null)\n\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\tif(payment.paymentName != undefined && payment.paymentName != null){\n\t\t\t\t\t\t\t\t\t\tthis.paymentMethod = payment.paymentName;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tthis.paymentMethod = this.order.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tthis.paymentMethod = this.order.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\t\tmessage: `${errorResponse.title}: ${errorResponse.message}`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.paymentMethod = this.order.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.orderAmount = Math.round(Number(order.price.totalPrice) * 100);\n\t\t\t\t\tthis.displayOrderAmount = currency (order.price.totalPrice, order.currency.shortName);\n\t\t\t\t\tthis.displayPaidAmount = currency (0, order.currency.shortName);\n\t\t\t\t\tthis.refundedAmount = currency (0, order.currency.shortName);\n\t\t\t\t\t\n\t\t\t\t\tthis.canCaptureVoid = false;this.canRefund = false;this.canZeroAmountBooking = false;this.canInstalmentCancel = false;this.canInstalmentShow = false;this.InstalmentInfo = []; this.canInstalmentAllCancel = false; this.canInstalmentRemainCancel = false;\n\t\t\t\t\t\n\t\t\t\t\tthis.NovalPaymentApiCredentialsService.getNovalnetAmount(order.orderNumber).then((payment) => {\n\t\t\t\t\t\tif(payment.data != '' && payment.data != undefined)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif(payment.data.gatewayStatus) {\n\t\t\t\t\t\t\t\tlet additionalDetails = JSON.parse(payment.data.additionalDetails);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tthis.refundableAmount = Number(payment.data.amount) - Number(payment.data.refundedAmount);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (payment.data.amount !=0 ) {\n\t\t\t\t\t\t\t\t\tthis.displayOrderAmount = currency (payment.data.amount/100, order.currency.shortName);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(payment.data.gatewayStatus == 'ON_HOLD' || this.onholdStatus.includes(payment.data.gatewayStatus)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.canCaptureVoid = true;\n\t\t\t\t\t\t\t\t} else if (((payment.data.amount > 0 && payment.data.gatewayStatus == 'CONFIRMED' && !this.instalmentPayments.includes(payment.data.paymentType) && Number(payment.data.refundedAmount) < Number(payment.data.amount)) || (payment.data.gatewayStatus == 'PENDING' && this.payLater.includes(payment.data.paymentType))) && payment.data.paymentType != 'MULTIBANCO' ) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.canRefund = true;\n\t\t\t\t\t\t\t\t} else if (this.instalmentPayments.includes(payment.data.paymentType) && payment.data.gatewayStatus == 'CONFIRMED' && !additionalDetails.cancelType)\n {\n this.canInstalmentCancel = true;\n \n } else if (((payment.data.paymentType == 'CREDITCARD') || (payment.data.paymentType == 'DIRECT_DEBIT_SEPA') || (payment.data.paymentType == 'GOOGLEPAY') || (payment.data.paymentType == 'APPLEPAY') || (payment.data.paymentType == 'DIRECT_DEBIT_ACH')) && Number(payment.data.amount) == 0 && this.orderAmount != 0 && payment.data.gatewayStatus !='FAILURE')\n {\n\t\t\t\t\t\t\t\t\tthis.canZeroAmountBooking = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (payment.data.paidAmount != 0) {\n\t\t\t\t\t\t\t\t\tthis.displayPaidAmount = currency (payment.data.paidAmount / 100, order.currency.shortName);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (payment.data.refundedAmount != 0) {\n\t\t\t\t\t\t\t\t\tthis.refundedAmount = currency (payment.data.refundedAmount / 100, order.currency.shortName);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif( (this.instalmentPayments.includes(payment.data.paymentType)) && payment.data.gatewayStatus == 'CONFIRMED' && additionalDetails.InstalmentDetails != '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.canInstalmentShow = true;\n\t\t\t\t\t\t\t\t\tthis.instalmentRefundAmount = payment.data.refundedAmount;\n\t\t\t\t\t\t\t\t\tvar counter = 1;\n\n\t\t\t\t\t\t\t\t\tObject.values(additionalDetails.InstalmentDetails).forEach(values => {\n\t\t\t\t\t\t\t\t\t this.InstalmentInfo.push ({\n\t\t\t\t\t\t\t\t\t\t\t'amount': currency (values.amount / 100, order.currency.shortName),\n\t\t\t\t\t\t\t\t\t\t\t'totalAmount': values.amount,\n\t\t\t\t\t\t\t\t\t\t\t'nextCycle': values.cycleDate,\n\t\t\t\t\t\t\t\t\t\t\t'reference': values.reference,\n\t\t\t\t\t\t\t\t\t\t\t'status': values.status,\n\t\t\t\t\t\t\t\t\t\t\t'refundAmount': values.refundAmount,\n\t\t\t\t\t\t\t\t\t\t\t'number': counter\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(payment.data.refundedAmount != 0){\n\t\t\t\t\t\t\t\t\t\tthis.canInstalmentCancel = false;\n\t\t\t\t\t\t\t\t\t\tthis.canInstalmentAllCancel = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (this.InstalmentInfo != undefined && this.InstalmentInfo != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tthis.InstalmentInfo.forEach(value => {\n\t\t\t\t\t\t\t\t\t\t\tif(value['reference'] == '' || value['reference'] == null)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tthis.canInstalmentRemainCancel = true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(additionalDetails.cancelType != undefined && additionalDetails.cancelType !=''){\n\t\t\t\t\t\t\t\t\t\tthis.canInstalmentRemainCancel = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(this.canInstalmentRemainCancel == false && payment.data.refundedAmount == 0 ){\n\t\t\t\t\t\t\t\t\t\tthis.canInstalmentCancel = false;\n\t\t\t\t\t\t\t\t\t\tthis.canInstalmentAllCancel = true;\n\t\t\t\t\t\t\t\t\t} else if(this.canInstalmentCancel == true){\n\t\t\t\t\t\t\t\t\t\tthis.canInstalmentRemainCancel = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: `${errorResponse.title}: ${errorResponse.message}`\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tthis.setNovalnetPayment(false);\n\t\t\t\t});\n },\n immediate: true\n }\n },\n \n methods: {\n\t\tsetNovalnetPayment( novalnetPayment ) {\n if( novalnetPayment ) {\n this.isNovalnetPayment = novalnetPayment;\n }\n },\n \n showConfirmModal() {\n this.status = 100;\n this.confirmModalVisible = true;\n },\n \n showRefundModal() {\n this.refundModalVisible = true;\n },\n \n closeModals() {\n\t\t\tthis.refundModalVisible = false;\n\t\t\tthis.confirmModalVisible = false;\n\t\t\tthis.cancelModalVisible = false;\n\t\t\tthis.zeroAmountVisible = false;\n\t\t\tthis.instalmentRefundModalVisible = false;\n\t\t},\n\t\t\n\t\tshowInstalmentAllCancelModal() {\n\t\t\tthis.instalmentRefundModalVisible = true;\n\t\t\tthis.cancelType = 'CANCEL_ALL_CYCLES';\n },\n \n showInstalmentRemainCancelModal(){\n\t\t\tthis.instalmentRefundModalVisible = true;\n\t\t\tthis.cancelType = 'CANCEL_REMAINING_CYCLES';\n },\n \n showCancelModal() {\n this.status = 103;\n this.cancelModalVisible = true;\n },\n \n showZeroAmountBlock() {\n this.zeroAmountVisible = true;\n },\n \n reloadPaymentDetails() {\n\t\t\tthis.closeModals();\n\t\t\t// Wait for the next tick to trigger the reload. Otherwise the Modal won't be hidden correctly.\n\t\t\tthis.$nextTick().then(() => {\n\t\t\t\tthis.$emit('reload-payment');\n\t\t\t});\n\t\t},\n\n\t\tinstalmentRefund(item) {\n\t\t\tthis.refundableAmount = item.totalAmount - item.refundAmount;\n\t\t\tthis.item = item;\n\t\t\tthis.refundModalVisible = true;\n\t\t},\n\t\t\n\t\tshowInstalmentCancelModal() {\n if (this.InstalmentInfo != undefined && this.InstalmentInfo != null)\n {\n this.InstalmentInfo.forEach(value => {\n if(value['reference'] == '' || value['reference'] == null)\n {\n this.canInstalmentRemainCancel = true;\n }\n });\n }\n \n if(this.instalmentRefundAmount == 0){\n\t\t\t\tthis.canInstalmentAllCancel = true;\n\t\t\t}\n this.canInstalmentCancel = false;\n },\n \n disableInstalmentRefund(item) {\n if( item.reference == undefined || item.reference == '' || item.refundAmount >= item.totalAmount || !this.acl.can('novalnet_extension.editor'))\n {\n return true;\n }\n \n return false;\n }\n\t}\n});\n","export default \"{% block sw_order_create_details_payment %}\\n\\n\\t{% parent %}\\n\\t{% block sw_order_create_details_payment_novalnet_seaction %}\\n\\t\\t\\n\\t\\t\\n\\t{% endblock %}\\n{% endblock %}\\n\";","import template from './sw-order-create-details.html.twig';\nimport './sw-order-create-details.scss';\n\nconst { Component, State, Mixin, Filter, Context, ContextSwitchParameters} = Shopware;\nconst Criteria = Shopware.Data.Criteria;\nconst { currency } = Shopware.Utils.format;\n\nComponent.override('sw-order-create-details', {\n template,\n\n inject: [\n 'NovalPaymentApiCredentialsService',\n 'repositoryFactory',\n 'acl',\n ],\n\n mixins: [\n Mixin.getByName('notification')\n ],\n\n data() {\n return {\n isLoading: false,\n loaded : false,\n shouldDisable : true,\n iframe: {\n src: ''\n },\n paymentformurl : '',\n novalnetPayment : false\n };\n },\n\n computed: {\n customer() {\n return State.get('swOrder').customer;\n },\n cart() {\n return State.get('swOrder').cart;\n },\n currency(){\n return State.get('swOrder').context.currency;\n },\n cartPrice() {\n return this.cart.price;\n },\n salesChannelContext(){\n return State.get('swOrder').context;\n },\n },\n\n watch: {\n salesChannelContext: {\n deep: true,\n handler() {\n if (!this.customer || !this.isCartTokenAvailable) {\n return;\n }\n\n this.isLoading = true;\n const paymentRepository = this.repositoryFactory.create('payment_method');\n const paymentCriteria = new Criteria(1, 1);\n paymentCriteria.addFilter(Criteria.equals('id', this.salesChannelContext.paymentMethod.id));\n paymentRepository.search(paymentCriteria, Context.api).then((searchResult) => {\n const payment = searchResult.first();\n if (!payment) {\n return\n }\n\n this.novalnetPayment = false;\n if ((payment.customFields != null) && (payment.customFields.novalnet_payment_method_name == 'novalnetpay')) {\n if (this.currency == null) {\n this.createNotificationError({\n title: this.$tc('novalnet-payment.settingForm.titleError'),\n message: this.$tc('novalnet-payment.settingForm.currencyFailureMessage')\n });\n\n return;\n }\n\n if (this.cartPrice != null && (this.cartPrice.totalPrice == 0 || this.cartPrice.totalPrice == null)) {\n this.createNotificationError({\n title: this.$tc('novalnet-payment.settingForm.titleError'),\n message: this.$tc('novalnet-payment.settingForm.lineitemFailureMessage')\n });\n\n return;\n }\n\n this.novalnetPayment = true;\n let billingaddress = '';\n let shippingaddress = '';\n\n if(this.salesChannelContext.customer.defaultBillingAddress !== null) {\n\t\t\t\t\t\t\tbillingaddress = this.salesChannelContext.customer.defaultBillingAddress;\n\t\t\t\t\t\t} else if (this.context.billingAddressId != null) {\n\t\t\t\t\t\t\tthis.customer.addresses.forEach(value => {\n\t\t\t\t\t\t\t\t if (value.id == this.context.billingAddressId) {\n\t\t\t\t\t\t\t\t\t billingaddress = value;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(this.salesChannelContext.customer.defaultShippingAddress !== null) {\n\t\t\t\t\t\t\tshippingaddress = this.salesChannelContext.customer.defaultShippingAddress;\n\t\t\t\t\t\t} else if (this.context.shippingAddressId != null) {\n\t\t\t\t\t\t\tthis.customer.addresses.forEach(value => {\n\t\t\t\t\t\t\t\t if (value.id == this.context.shippingAddressId) {\n\t\t\t\t\t\t\t\t\t billingaddress = value;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t}\n \n let me = this.NovalPaymentApiCredentialsService;\n let customerPaymentDetails = this.customer;\n this.NovalPaymentApiCredentialsService.novalnetPayment(shippingaddress, billingaddress, this.cartPrice.totalPrice , this.currency.isoCode, this.customer ).then((payment) => {\n if (payment != '' && payment != undefined) {\n if (payment.result.status =='SUCCESS' && payment.result.redirect_url != '' && payment.result.redirect_url != undefined) {\n this.iframe.src = payment.result.redirect_url;\n this.loaded = true;\n const recaptchaScript = document.createElement('script');\n recaptchaScript.setAttribute('src', 'https://cdn.novalnet.de/js/pv13/checkout.js?' + new Date().getTime());\n recaptchaScript.type = 'text/javascript';\n document.head.appendChild(recaptchaScript);\n this.paymentformurl = recaptchaScript;\n this.paymentformurl.addEventListener('load', ()=> {\n\t\t\t\t\t\t\t\t\t\t document.querySelector('.sw-button-process').disabled = false;\n this.onWindowLoad(me, customerPaymentDetails);\n });\n }\n }\n }).catch((errorResponse) => {\n this.createNotificationError({\n message: `${errorResponse.title}: ${errorResponse.message}`\n });\n });\n }\n });\n },\n },\n\n customer: {\n deep: true,\n handler() {\n if (this.customer == null) {\n return;\n }\n },\n immediate: true\n }\n },\n\n methods: {\n onWindowLoad(e, customer) {\n const paymentForm = new NovalnetPaymentForm();\n const submit = document.querySelector('.sw-button-process');\n const keyname = 'ordernovalnetpayment';\n\n let paymentType = '',\n request = {\n iframe: '#adminnovalnetPaymentiframe',\n initForm: {\n uncheckPayments: false,\n showButton: false,\n }\n };\n\n paymentForm.initiate(request);\n paymentForm.validationResponse((data) => {\n paymentForm.initiate(request);\n });\n\n paymentForm.selectedPayment((function(selectPaymentData) {\n paymentType = selectPaymentData.payment_details.type;\n\n }));\n\n submit.addEventListener('click', (event) => {\n event.preventDefault();\n event.stopImmediatePropagation();\n paymentForm.getPayment((function(paymentDetails) {\n let value = JSON.stringify(paymentDetails);\n e.paymentValue(value, customer).then((payment) => {\n });\n }));\n });\n },\n },\n});\n","import template from './novalnet-payment-refund-modal.html.twig';\n\nconst { Component, Mixin } = Shopware;\nconst { currency } = Shopware.Utils.format;\n\nComponent.register('novalnet-payment-refund-modal', {\n\ttemplate,\n\t\n\tprops:{\n\t\t\n\t\trefundableAmount : {\n\t\t\ttype : Number,\n\t\t\trequired : true\n\t\t},\n\t\t\n\t\torder: {\n\t\t\ttype : Object,\n\t\t\trequired : true\n\t\t},\n\t\t\n\t\titem: {\n\t\t\ttype : Object,\n\t\t\trequired : true\n\t\t}\n\t\t\n\t},\n\t\n\tinject: [\n\t\n\t\t'NovalPaymentApiCredentialsService',\n 'repositoryFactory',\n\t],\n\t\n\tmixins: [\n Mixin.getByName('notification'),\n Mixin.getByName('sw-inline-snippet')\n ],\n \n data(){\n\t\treturn {\n\t\t\treason: '',\n\t\t\tdisable: false,\n\t\t};\n\t},\n\t\n\t methods: {\n\t\t \n\t\tcloseModal() {\n this.$emit('modal-close');\n },\n\n novalnetRefund()\n {\n let refundAmount\t= this.refundableAmount;\n const reason\t\t= this.reason;\n const orderNumber\t= this.order.orderNumber;\n\n\t\t\tif(refundAmount == '0')\n\t\t\t{\n\t\t\t\tthis.createNotificationError({\n\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.amountRefundError')\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.disable = true;\n\t\t\t\n this.NovalPaymentApiCredentialsService.refundPayment(\n orderNumber,\n refundAmount,\n reason,\n this.item.reference,\n ).then((response) => {\n\t\t\t\tif(response.result != undefined && response.result != null) {\n\t\t\t\t\t\n\t\t\t\t\tif(response.result.status != undefined && response.result.status != null && response.result.status == 'SUCCESS'){\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.extension.refundSuccess')\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse if(response.result.status_text != undefined && response.result.status_text != null && response.result.status_text != '') {\n\t\t\t\t\t\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\t\tmessage: response.result.status_text,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.failureMessage')\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.failureMessage')\n\t\t\t\t\t\t});\n\t\t\t\t}\n this.$emit('modal-close');\n setTimeout(this.$router.go, 3000);\n }).catch((errorResponse) => {\n this.createNotificationError({\n message: `${errorResponse.title}: ${errorResponse.message}`,\n autoClose: false\n });\n this.$emit('modal-close');\n });\n\t\t},\n\t}\n});\n","export default \"{% block novalnet_payment_order_refund_modal %}\\n \\n\\t\\t\\n\\t\\t\\t{% block novalnet_payment_order_refund_modal_content %}\\n\\t\\t\\t\\t\\n\\t\\t\\t{% endblock %}\\n\\n\\t\\t\\t{% block novalnet_payment_order_refund_modal_actions %}\\n\\t\\t\\t\\t\\n\\t\\t\\t{% endblock %}\\n \\n{% endblock %}\\n\";","export default \"{% block novalnet_payment_order_manage_modal %}\\n \\n\\n {% block novalnet_payment_order_manage_modal_content %}\\n \\n {% endblock %}\\n\\n {% block novalnet_payment_order_manage_modal_actions %}\\n \\n {% endblock %}\\n \\n{% endblock %}\\n\";","import template from './novalnet-payment-manage-transaction-modal.html.twig';\n\nconst { Component, Mixin } = Shopware;\nconst { currency } = Shopware.Utils.format;\n\nComponent.register('novalnet-payment-manage-transaction-modal', {\n template,\n\n props: {\n status: {\n type: Number,\n required: true\n },\n order: {\n type: Object,\n required: true\n }\n },\n\n inject: [\n 'NovalPaymentApiCredentialsService',\n 'repositoryFactory'\n ],\n\n mixins: [\n Mixin.getByName('notification'),\n Mixin.getByName('sw-inline-snippet')\n ],\n\n data() {\n return {\n confirm: true,\n cancel: false,\n disable: false\n };\n },\n\n methods: {\n\n\t\tcloseModal() {\n this.$emit('modal-close');\n },\n\n\t\tnovalnetOnhold()\n {\n\t\t\tlet status\t= this.status;\n\t\t\tconst orderNumber\t= this.order.orderNumber;\n\n\t\t\tif( status == '' || status == undefined )\n\t\t\t{\n\t\t\t\tthis.createNotificationError({\n\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.extension.onholdLabel')\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.disable = true;\n\n\t\t\tthis.NovalPaymentApiCredentialsService.managePayment(\n orderNumber,\n status\n ).then((response) => {\n\t\t\t\t\n\t\t\t\tif(response !=''){\n\t\t\t\t\t\n\t\t\t\t\tif(response.result.status == 'SUCCESS')\n\t\t\t\t\t{\n\t\t\t\t\t\tif(status == 100) {\n\t\t\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.extension.onholdSuccess')\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.extension.onholdCancel')\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(response.result.status_text != undefined && response.result.status_text != null && response.result.status_text != '') {\n\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: response.result.status_text,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.failureMessage')\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.failureMessage')\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n this.$emit('modal-close');\n setTimeout(this.$router.go, 3000);\n }).catch((errorResponse) => {\n this.createNotificationError({\n message: `${errorResponse.title}: ${errorResponse.message}`,\n autoClose: false\n });\n this.$emit('modal-close');\n });\n\t\t}\n\t}\n});\n","export default \"{% block novalnet_payment_order_cancel_modal %}\\n \\n\\n\\t\\t\\t{% block novalnet_payment_order_cancel_modal_content %}\\n\\t\\t\\t\\t\\n\\t\\t\\t{% endblock %}\\n\\n\\t\\t\\t{% block novalnet_payment_order_cancel_modal_actions %}\\n\\t\\t\\t\\t\\n\\t\\t\\t{% endblock %}\\n \\n{% endblock %}\\n\";","import template from './novalnet-payment-instalment-cancel-modal.html.twig';\n\nconst { Component, Mixin } = Shopware;\nconst { currency } = Shopware.Utils.format;\n\nComponent.register('novalnet-payment-instalment-cancel-modal', {\n template,\n\n props: {\n cancelType: {\n type: String,\n required: true\n },\n order: {\n type: Object,\n required: true\n }\n },\n\n inject: [\n 'NovalPaymentApiCredentialsService',\n 'repositoryFactory'\n ],\n\n mixins: [\n Mixin.getByName('notification'),\n Mixin.getByName('sw-inline-snippet')\n ],\n\n data() {\n return {\n disable: false,\n };\n },\n\n methods: {\n\n\t\tcloseModal() {\n this.$emit('modal-close');\n },\n\n novalnetInstalmentCancel()\n {\n const orderNumber = this.order.orderNumber;\n const cancelType = this.cancelType;\n\t\t\tthis.disable = true;\n\t\t\t\n this.NovalPaymentApiCredentialsService.instalmentCancel(\n orderNumber,\n cancelType,\n ).then((response) => {\n\n\t\t\t\tif(response.result != '')\n\t\t\t\t{\n\t\t\t\t\tif(response.result.status != undefined && response.result.status != null && response.result.status == 'SUCCESS')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.extension.instalmentSuccessMsg')\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if(response.result.status_text != undefined && response.result.status_text != null && response.result.status_text != '') {\n\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: response.result.status_text,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.failureMessage')\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.failureMessage')\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis.$emit('modal-close');\n setTimeout(this.$router.go, 3000);\n }).catch((errorResponse) => {\n this.createNotificationError({\n message: `${errorResponse.title}: ${errorResponse.message}`,\n autoClose: false\n });\n this.$emit('modal-close');\n });\n\t\t},\n\t}\n});\n","export default \"{% block novalnet_payment_order_refund_modal %}\\n \\n\\t\\t\\n\\t\\t\\t{% block novalnet_payment_order_zero_amount_modal_content %}\\n\\t\\t\\t\\t\\n\\t\\t\\t{% endblock %}\\n\\n\\t\\t\\t{% block novalnet_payment_order_zero_amount_modal_actions %}\\n\\t\\t\\t\\t\\n\\t\\t\\t{% endblock %}\\n \\n{% endblock %}\\n\";","import template from './novalnet-payment-book-amount-modal.html.twig';\n\nconst { Component, Mixin } = Shopware;\nconst { currency } = Shopware.Utils.format;\n\nComponent.register('novalnet-payment-book-amount-modal', {\n template,\n\n props: {\n orderAmount: {\n type: Number,\n required: true\n },\n order: {\n type: Object,\n required: true\n }\n },\n\n inject: [\n 'NovalPaymentApiCredentialsService',\n 'repositoryFactory'\n ],\n\n mixins: [\n Mixin.getByName('notification'),\n Mixin.getByName('sw-inline-snippet')\n ],\n\n data() {\n return {\n reason: '',\n disable: false,\n };\n },\n\n methods: {\n\n\t\tcloseModal() {\n this.$emit('modal-close');\n },\n\n novalnetBookAmount()\n {\n const orderAmount = this.orderAmount;\n const orderNumber = this.order.orderNumber;\n \n\t\t\tif(orderAmount == 0)\n\t\t\t{\n\t\t\t\tthis.createNotificationError({\n\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.amountError')\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.disable = true;\n this.NovalPaymentApiCredentialsService.BookOrderAmount(\n\t\t\t\torderNumber,\n orderAmount\n ).then((response) => {\n\n\t\t\t\tif(\tresponse.result != undefined && response.result != null )\n\t\t\t\t{\n\t\t\t\t\tif(response.result.status != undefined && response.result.status != null && response.result.status == 'SUCCESS')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.createNotificationSuccess({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.extension.bookedSuccess')\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if(response.result.status_text != undefined && response.result.status_text != null && response.result.status_text != '') {\n\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: response.result.status_text,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.failureMessage')\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\tmessage: this.$tc('novalnet-payment.settingForm.failureMessage')\n\t\t\t\t\t});\n\t\t\t\t}\n this.$emit('modal-close');\n setTimeout(this.$router.go, 3000);\n }).catch((errorResponse) => {\n this.createNotificationError({\n message: `${errorResponse.title}: ${errorResponse.message}`,\n autoClose: false\n });\n this.$emit('modal-close');\n });\n\t\t},\n\t}\n});\n","export default \"{% block sw_order_detail_base_secondary_info_payment %}\\n\\t\\t\\n{% endblock %}\\n\";","import template from './sw-order-user-card.html.twig';\n\n\n/**\n * @package customer-order\n */\n\nconst { Component, Mixin } = Shopware;\nconst { Criteria } = Shopware.Data;\n\n\nComponent.override('sw-order-user-card', {\n template,\n\n inject: [\n 'NovalPaymentApiCredentialsService',\n 'repositoryFactory',\n ],\n\n mixins: [\n Mixin.getByName('notification'),\n ],\n\n props: {\n currentOrder: {\n type: Object,\n required: true,\n },\n isLoading: {\n type: Boolean,\n required: true,\n }\n },\n\n data() {\n return {\n paymentMethod : ''\n };\n },\n\t\n\twatch: {\n\t\t\n\t\tcurrentOrder: {\n deep: true,\n handler() {\n\t\t\t\tif (this.currentOrder == '') {\n return;\n }\n \n if (this.currentOrder.transactions.last().paymentMethod.customFields != null && this.currentOrder.transactions.last().paymentMethod.customFields.novalnet_payment_method_name != undefined && this.currentOrder.transactions.last().paymentMethod.customFields.novalnet_payment_method_name == \"novalnetpay\"){\n\n\t\t\t\t\tthis.NovalPaymentApiCredentialsService.getNovalnetPaymentMethod(this.currentOrder.orderNumber).then((payment) => {\n\t\t\t\t\t\t\tif(payment != undefined && payment != null)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tif(payment.paymentName != undefined && payment.paymentName != null){\n\t\t\t\t\t\t\t\t\tthis.paymentMethod = payment.paymentName;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tthis.paymentMethod = this.currentOrder.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis.paymentMethod = this.currentOrder.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: `${errorResponse.title}: ${errorResponse.message}`\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.paymentMethod = this.currentOrder.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t}\n\t\t\t},\n\t\t\timmediate: true\n\t\t}\n\t}\n \n\n \n\n});\n","export default \"{% block sw_order_detail_base_general_info_summary_sub_description %}\\n\\t
\\n\\t\\t{{ $tc('sw-order.generalTab.info.summary.on') }}\\n\\t\\t{{ order.orderDateTime | date({\\n\\t\\t\\thour: '2-digit',\\n\\t\\t\\tminute: '2-digit',\\n\\t\\t\\tday: '2-digit',\\n\\t\\t\\tmonth: '2-digit',\\n\\t\\t\\tyear: 'numeric'\\n\\t\\t}) }}\\n\\t\\t{{ $tc('sw-order.generalTab.info.summary.with') }}\\n\\t\\t{{ paymentMethod }} \\n\\t\\t\\n\\t
\\n{% endblock %}\\n\";","import template from './sw-order-general-info.html.twig';\n\n\n/**\n * @package customer-order\n */\n\nconst { Component, Mixin } = Shopware;\nconst { Criteria } = Shopware.Data;\n\n\nComponent.override('sw-order-general-info', {\n template,\n\n inject: [\n 'NovalPaymentApiCredentialsService',\n 'repositoryFactory',\n ],\n\n mixins: [\n Mixin.getByName('notification'),\n ],\n\n props: {\n order: {\n type: Object,\n required: true,\n },\n },\n\n data() {\n return {\n paymentMethod : ''\n };\n },\n\t\n\twatch: {\n\t\t\n\t\torder: {\n deep: true,\n handler() {\n\t\t\t\tif (this.order == '') {\n return;\n }\n\n if (this.order.transactions.last().paymentMethod.customFields != null && this.order.transactions.last().paymentMethod.customFields.novalnet_payment_method_name != undefined && this.order.transactions.last().paymentMethod.customFields.novalnet_payment_method_name == \"novalnetpay\") {\n\n\t\t\t\t\tthis.NovalPaymentApiCredentialsService.getNovalnetPaymentMethod(this.order.orderNumber).then((payment) => {\n\t\t\t\t\t\t\tif(payment != undefined && payment != null)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tif(payment.paymentName != undefined && payment.paymentName != null){\n\t\t\t\t\t\t\t\t\tthis.paymentMethod = payment.paymentName;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tthis.paymentMethod = this.order.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis.paymentMethod = this.order.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}).catch((errorResponse) => {\n\t\t\t\t\t\tthis.createNotificationError({\n\t\t\t\t\t\t\tmessage: `${errorResponse.title}: ${errorResponse.message}`\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tthis.paymentMethod = this.order.transactions.last().paymentMethod.translated.distinguishableName;\n\t\t\t\t}\n\t\t\t},\n\t\t\timmediate: true\n\t\t}\n\t}\n \n\n \n\n});\n","import './page/novalnet-payment-settings';\nimport './components/novalnet-payment-credentials';\nimport './components/novalnet-payment-settings-icon';\nimport './extension/sw-order/view/sw-order-detail-details';\nimport './extension/sw-order/view/sw-order-create-details';\nimport './extension/sw-order/view/sw-order-create-general';\nimport './extension/sw-order/view/novalnet-payment-refund-modal';\nimport './extension/sw-order/view/novalnet-payment-manage-transaction-modal';\nimport './extension/sw-order/view/novalnet-payment-instalment-cancel-modal';\nimport './extension/sw-order/view/novalnet-payment-book-amount-modal';\nimport './extension/sw-order/component/sw-order-user-card';\nimport './extension/sw-order/component/sw-order-general-info';\n\nimport deDE from './snippet/de_DE.json';\nimport enGB from './snippet/en_GB.json';\n\nconst { Module } = Shopware;\n\nModule.register('novalnet-payment', {\n\t\n\ttype\t: 'plugin',\n\tname\t: 'NovalnetPayment',\n\ttitle\t: 'novalnet-payment.module.title',\n\tdescription\t:'novalnet-payment.module.description',\n\t\n\t\n\tsnippets: {\n 'de-DE': deDE,\n 'en-GB': enGB\n },\n\troutes: {\n index: {\n\t\t\tcomponent: 'novalnet-payment-settings',\n path: 'index',\n meta: {\n parentPath: 'sw.settings.index',\n privilege: 'novalnet_payment.viewer',\n }\n },\n detail: {\n component: 'novalnet-payment-settings',\n path: 'settings',\n redirect: {\n name: 'novalnet.payment.credentials'\n },\n children: {\n\t\t\t\tcredentials: {\n\t\t\t\t\tcomponent: 'novalnet-payment-credentials',\n\t\t\t\t\tpath: 'credentials',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tparentPath: 'sw.settings.index',\n\t\t\t\t\t\tprivilege: 'novalnet_payment.viewer',\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \n },\n\tsettingsItem: {\n group: 'plugins',\n to: 'novalnet.payment.detail.credentials',\n iconComponent: 'novalnet-payment-settings-icon',\n backgroundEnabled: true,\n privilege: 'novalnet_payment.viewer'\n }\n});\n","const ApiService = Shopware.Classes.ApiService;\n\nclass NovalPaymentApiCredentialsService extends ApiService {\n constructor(httpClient, loginService, apiEndpoint = 'novalnet-payment') {\n super(httpClient, loginService, apiEndpoint);\n }\n\n validateApiCredentials(clientId, accessKey) {\n const headers = this.getBasicHeaders();\n\n return this.httpClient\n .post(\n `_action/${this.getApiBasePath()}/validate-api-credentials`,\n {\n\t\t\t\t\tclientId,\n\t\t\t\t\taccessKey\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\theaders: this.getBasicHeaders()\n\t\t\t\t}\n )\n .then((response) => {\n return ApiService.handleResponse(response);\n });\n }\n \n getNovalnetAmount(orderNumber){\n\t\tconst headers = this.getBasicHeaders();\n\t\t\n\t\treturn this.httpClient\n .post(\n `_action/${this.getApiBasePath()}/transaction-amount`,\n {\n\t\t\t\t\torderNumber\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\theaders: this.getBasicHeaders()\n\t\t\t\t}\n )\n .then((response) => {\n return ApiService.handleResponse(response);\n });\n\t}\n\t\n\trefundPayment(orderNumber, refundAmount, reason, instalmentCycleTid){\n\t\tconst headers = this.getBasicHeaders();\n\t\t\n\t\treturn this.httpClient\n .post(\n `_action/${this.getApiBasePath()}/refund-amount`,\n {\n\t\t\t\t\torderNumber,\n\t\t\t\t\trefundAmount,\n\t\t\t\t\treason,\n\t\t\t\t\tinstalmentCycleTid\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\theaders: this.getBasicHeaders()\n\t\t\t\t}\n )\n .then((response) => {\n return ApiService.handleResponse(response);\n });\n\t}\n\t\n\tmanagePayment(orderNumber, status){\n\t\tconst headers = this.getBasicHeaders();\n\t\t\n\t\treturn this.httpClient\n .post(\n `_action/${this.getApiBasePath()}/manage-payment`,\n {\n\t\t\t\t\torderNumber: orderNumber,\n\t\t\t\t\tstatus: status\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\theaders: this.getBasicHeaders()\n\t\t\t\t}\n )\n .then((response) => {\n return ApiService.handleResponse(response);\n });\n\t}\n\t\n\tinstalmentCancel(orderNumber, cancelType){\n\t\tconst headers = this.getBasicHeaders();\n\t\t\n\t\treturn this.httpClient\n .post(\n `_action/${this.getApiBasePath()}/instalment-cancel`,\n {\n\t\t\t\t\torderNumber,\n\t\t\t\t\tcancelType\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\theaders: this.getBasicHeaders()\n\t\t\t\t}\n )\n .then((response) => {\n return ApiService.handleResponse(response);\n });\n\t}\n\t\n\t BookOrderAmount(orderNumber, bookAmount) {\n const apiRoute = `_action/${this.getApiBasePath()}/book-amount`;\n\n return this.httpClient.post(\n apiRoute,\n {\n\t\t\t\torderNumber,\n\t\t\t\tbookAmount\n },\n {\n headers: this.getBasicHeaders()\n }\n ).then((response) => {\n return ApiService.handleResponse(response);\n });\n }\n \n getNovalnetPaymentMethod (orderNumber) {\n const apiRoute = `_action/${this.getApiBasePath()}/novalnet-paymentmethod`;\n\n return this.httpClient.post(\n apiRoute,\n {\n\t\t\t\torderNumber\n\t\t\t\t\n },\n {\n headers: this.getBasicHeaders()\n }\n ).then((response) => {\n return ApiService.handleResponse(response);\n });\n }\n \n configureWebhookUrl(url, productActivationKey, paymentAccessKey) {\n const apiRoute = `_action/${this.getApiBasePath()}/webhook-url-configure`;\n\n return this.httpClient.post(\n apiRoute,\n {\n\t\t\t\turl,\n\t\t\t\tproductActivationKey,\n\t\t\t\tpaymentAccessKey\n },\n {\n headers: this.getBasicHeaders()\n }\n ).then((response) => {\n return ApiService.handleResponse(response);\n });\n }\n \n novalnetPayment(shippingaddress, billingaddress, amount, currency, customer) {\n const apiRoute = `_action/${this.getApiBasePath()}/load-payment-form`;\n\n return this.httpClient.post(\n apiRoute,\n {\n\t\t\t\tshippingaddress,\n\t\t\t\tbillingaddress,\n\t\t\t\tamount,\n\t\t\t\tcurrency,\n\t\t\t\tcustomer\n },\n {\n headers: this.getBasicHeaders()\n }\n ).then((response) => {\n return ApiService.handleResponse(response);\n });\n }\n \n \n paymentValue(value, customer) {\n const apiRoute = `_action/${this.getApiBasePath()}/payment-value-data`;\n\n return this.httpClient.post(\n apiRoute,\n {\n\t\t\t\tvalue,\n\t\t\t\tcustomer\n },\n {\n headers: this.getBasicHeaders()\n }\n ).then((response) => {\n return ApiService.handleResponse(response);\n });\n }\n \n \n}\n\nexport default NovalPaymentApiCredentialsService;\n","import NovalPaymentApiCredentialsService\n from '../../src/core/service/api/novalnet-payment-api-credentials.service';\n\nconst { Application } = Shopware;\n\nApplication.addServiceProvider('NovalPaymentApiCredentialsService', (container) => {\n const initContainer = Application.getContainer('init');\n\n return new NovalPaymentApiCredentialsService(initContainer.httpClient, container.loginService);\n});\n\n","// style-loader: Adds some css to the DOM by adding a