File "payment-url.min.js.map"
Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/swedbank-pay-checkout/assets/js/featherlight/payment-url.min.js.map
File size: 6.09 KB
MIME-type: application/json
Charset: utf-8
{"version":3,"file":"payment-url.min.js","names":["jQuery","$","window","wc_sb_payment_url","js_url","payment_url","WC_Sb_Payment_Url","paymentMenu","isPaymentMenuLoaded","xhr","isLocked","initPaymentJS","url","callback","hasOwnProperty","payex","hostedView","close","remove","wc_sb_common","loadJs","hide","initPaymentMenu","id","console","log","this","container","culture","style","paymentMenuStyle","JSON","parse","onApplicationConfigured","data","onPaymentMenuInstrumentSelected","onPaymentCreated","onPaymentCompleted","self","location","href","redirectUrl","onPaymentCanceled","logError","onPaymentFailed","onError","open","document","ready"],"sources":["payment-url.js"],"sourcesContent":["/* global wc_checkout_params */\njQuery( function( $ ) {\n 'use strict';\n\n window.wc_sb_payment_url = {\n js_url: null,\n payment_url: WC_Sb_Payment_Url.payment_url,\n paymentMenu: null,\n isPaymentMenuLoaded: false,\n xhr: false,\n isLocked: false,\n\n /**\n * Initiate Payment Javascript\n * @param url\n * @param callback\n */\n initPaymentJS: function ( url, callback ) {\n if ( typeof callback === 'undefined' ) {\n callback = function () {};\n }\n\n // Destroy\n if ( window.hasOwnProperty( 'payex' ) && window.payex.hasOwnProperty( 'hostedView' ) ) {\n if ( typeof window.payex.hostedView.paymentMenu !== 'undefined' ) {\n window.payex.hostedView.paymentMenu().close();\n }\n\n $( '#payment-swedbank-pay-checkout iframe' ).remove();\n //delete window.payex.hostedView;\n }\n\n // Destroy JS\n $( \"script[src*='px.paymentmenu.client']\" ).remove();\n\n // Load JS\n wc_sb_common.loadJs( url, function () {\n $( '#payment-swedbank-pay-checkout iframe' ).remove();\n\n // Initiate the payment menu in \"Instant Checkout\"\n $( '#payment' ).hide();\n wc_sb_payment_url.initPaymentMenu( 'payment-swedbank-pay-checkout' );\n\n callback()\n } );\n },\n\n /**\n * Initiate Payment Menu.\n * Payment Javascript must be loaded.\n *\n * @param id\n * @param callback\n */\n initPaymentMenu: function ( id, callback ) {\n console.log( 'initPaymentMenu' );\n\n if ( typeof callback === 'undefined' ) {\n callback = function () {};\n }\n\n // Load SwedBank Pay Checkout frame\n this.paymentMenu = window.payex.hostedView.paymentMenu( {\n container: id,\n culture: WC_Sb_Payment_Url.culture,\n style: WC_Sb_Payment_Url.paymentMenuStyle ? JSON.parse( WC_Sb_Payment_Url.paymentMenuStyle ) : null,\n onApplicationConfigured: function( data ) {\n console.log( 'onApplicationConfigured' );\n console.log( data );\n wc_sb_payment_url.isPaymentMenuLoaded = true;\n callback( null );\n },\n onPaymentMenuInstrumentSelected: function ( data ) {\n console.log( 'onPaymentMenuInstrumentSelected' );\n console.log( data );\n //wc_sb_checkout.onPaymentMenuInstrumentSelected( data.name, data.instrument );\n },\n onPaymentCreated: function () {\n console.log( 'onPaymentCreated' );\n },\n onPaymentCompleted: function ( data ) {\n console.log( 'onPaymentCompleted' );\n console.log( data );\n self.location.href = data.redirectUrl;\n },\n onPaymentCanceled: function ( data ) {\n console.log( 'onPaymentCanceled' );\n console.log( data );\n wc_sb_common.logError( 'payment-menu-cancel', data );\n },\n onPaymentFailed: function ( data ) {\n console.log( 'onPaymentFailed' );\n console.log( data );\n wc_sb_common.logError( 'payment-menu-failed', data );\n //self.location.href = data.redirectUrl;\n },\n onError: function ( data ) {\n wc_sb_common.logError( 'payment-menu-error', data );\n callback( data );\n }\n } );\n\n this.paymentMenu.open();\n },\n }\n\n $(document).ready( function () {\n wc_sb_payment_url.initPaymentJS( WC_Sb_Payment_Url.payment_url, function () {\n console.log( 'Payment url has been loaded.' );\n } );\n } );\n});\n"],"mappings":"AACAA,QAAQ,SAAUC,GACd,aAEAC,OAAOC,kBAAoB,CACvBC,OAAQ,KACRC,YAAaC,kBAAkBD,YAC/BE,YAAa,KACbC,qBAAqB,EACrBC,KAAK,EACLC,UAAU,EAOVC,cAAe,SAAWC,EAAKC,QACF,IAAbA,IACRA,EAAW,WAAa,GAI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