File "order-status.min.js.map"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/swedbank-pay-checkout/assets/js/order-status.min.js.map
File size: 3.99 KB
MIME-type: application/json
Charset: utf-8

{"version":3,"file":"order-status.min.js","names":["jQuery","$","window","wc_sb_checkout_order_status","xhr","attempts","init","this","checkPayment","err","data","status_elm","success_elm","failed_elm","state","hide","show","append","message","setTimeout","callback","block","WC_Gateway_Swedbank_Pay_Checkout_Order_Status","check_message","overlayCSS","background","opacity","ajax","type","url","ajax_url","action","nonce","order_id","order_key","dataType","always","unblock","done","response","document","ready"],"sources":["order-status.js"],"sourcesContent":["jQuery( function( $ ) {\n    'use strict';\n\n    window.wc_sb_checkout_order_status = {\n        xhr: false,\n        attempts: 0,\n\n        /**\n         * Initialize the checking\n         */\n        init: function() {\n            this.checkPayment( function ( err, data ) {\n                var status_elm = $( '#order-status-checking' ),\n                    success_elm = $( '#order-success' ),\n                    failed_elm = $( '#order-failed' );\n\n                switch ( data.state ) {\n                    case 'paid':\n                        status_elm.hide();\n                        success_elm.show();\n                        break;\n                    case 'failed':\n                    case 'aborted':\n                        status_elm.hide();\n                        failed_elm.append(\"<p>\" + data.message + \"</p>\");\n                        failed_elm.show();\n                        break;\n                    default:\n                        window.wc_sb_checkout_order_status.attempts++;\n\n                        if ( window.wc_sb_checkout_order_status.attempts > 6) {\n                            return;\n                        }\n\n                        setTimeout(function () {\n                            window.wc_sb_checkout_order_status.init();\n                        }, 10000);\n                }\n            } );\n        },\n\n        /**\n         * Check payment\n         * @return {JQueryPromise<any>}\n         */\n        checkPayment: function ( callback ) {\n            $( '.woocommerce-order' ).block( {\n                message: WC_Gateway_Swedbank_Pay_Checkout_Order_Status.check_message,\n                overlayCSS: {\n                    background: '#fff',\n                    opacity: 0.6\n                }\n            } );\n\n            return $.ajax( {\n                type: 'POST',\n                url: WC_Gateway_Swedbank_Pay_Checkout_Order_Status.ajax_url,\n                data: {\n                    action: 'swedbank_checkout_check_payment',\n                    nonce: WC_Gateway_Swedbank_Pay_Checkout_Order_Status.nonce,\n                    order_id: WC_Gateway_Swedbank_Pay_Checkout_Order_Status.order_id,\n                    order_key: WC_Gateway_Swedbank_Pay_Checkout_Order_Status.order_key,\n                },\n                dataType: 'json'\n            } ).always( function() {\n                $( '.woocommerce-order' ).unblock();\n            } ).done( function ( response ) {\n                callback( null, response.data );\n            } );\n        },\n    };\n\n    $(document).ready( function () {\n        window.wc_sb_checkout_order_status.init();\n    } );\n} );\n"],"mappings":"AAAAA,QAAQ,SAAUC,GACd,aAEAC,OAAOC,4BAA8B,CACjCC,KAAK,EACLC,SAAU,EAKVC,KAAM,WACFC,KAAKC,cAAc,SAAWC,EAAKC,GAC/B,IAAIC,EAAaV,EAAG,0BAChBW,EAAcX,EAAG,kBACjBY,EAAaZ,EAAG,iBAEpB,OAASS,EAAKI,OACV,IAAK,OACDH,EAAWI,OACXH,EAAYI,OACZ,MACJ,IAAK,SACL,IAAK,UACDL,EAAWI,OACXF,EAAWI,OAAO,MAAQP,EAAKQ,QAAU,QACzCL,EAAWG,OACX,MACJ,QAGI,GAFAd,OAAOC,4BAA4BE,WAE9BH,OAAOC,4BAA4BE,SAAW,EAC/C,OAGJc,YAAW,WACPjB,OAAOC,4BAA4BG,MACvC,GAAG,KAEf,GACJ,EAMAE,aAAc,SAAWY,GASrB,OARAnB,EAAG,sBAAuBoB,MAAO,CAC7BH,QAASI,8CAA8CC,cACvDC,WAAY,CACRC,WAAY,OACZC,QAAS,MAIVzB,EAAE0B,KAAM,CACXC,KAAM,OACNC,IAAKP,8CAA8CQ,SACnDpB,KAAM,CACFqB,OAAQ,kCACRC,MAAOV,8CAA8CU,MACrDC,SAAUX,8CAA8CW,SACxDC,UAAWZ,8CAA8CY,WAE7DC,SAAU,SACVC,QAAQ,WACRnC,EAAG,sBAAuBoC,SAC9B,IAAIC,MAAM,SAAWC,GACjBnB,EAAU,KAAMmB,EAAS7B,KAC7B,GACJ,GAGJT,EAAEuC,UAAUC,OAAO,WACfvC,OAAOC,4BAA4BG,MACvC,GACJ"}