{"id":2036,"date":"2025-11-26T07:40:16","date_gmt":"2025-11-26T05:40:16","guid":{"rendered":"https:\/\/www.learn-music-online.com\/membership-join\/"},"modified":"2026-02-25T12:59:50","modified_gmt":"2026-02-25T10:59:50","slug":"membership-join","status":"publish","type":"page","link":"https:\/\/www.learn-music-online.com\/sr\/membership-join\/","title":{"rendered":"Pridru\u017eite se"},"content":{"rendered":"<div class=\"wp-block-group alignfull has-background-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-254d6575 wp-block-group-is-layout-constrained\" style=\"margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--30)\">\n<div class=\"wp-block-group alignwide is-vertical is-layout-flex wp-container-core-group-is-layout-fe9cc265 wp-block-group-is-layout-flex\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading has-large-font-size\">Fleksibilni planovi pretplate koji odgovaraju va\u0161em muzi\u010dkom putovanju<\/h2>\n\n\n\n<p style=\"margin-top:16px\">Izaberite izme\u0111u mese\u010dnih ili tromese\u010dnih pretplata, otklju\u010davaju\u0107i potpun pristup interaktivnim lekcijama i kursevima notnih zapisa.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns alignwide is-layout-flex wp-container-core-columns-is-layout-e1fea541 wp-block-columns-is-layout-flex\" style=\"margin-top:var(--wp--preset--spacing--50)\">\n<div class=\"wp-block-column has-tertiary-background-color has-background is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-eb524166 wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--30)\">\n<h2 class=\"wp-block-heading\" style=\"margin-top:12px\">$5.00<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:16px;font-size:clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.625), 20px);\">Mese\u010dni plan<\/h3>\n\n\n\n<p class=\"has-small-font-size\" style=\"margin-top:var(--wp--preset--spacing--40)\">Pristupite svim interaktivnim lekcijama uz jednostavnu jednomese\u010dnu pretplatu.<\/p>\n\n\n<div class=\"swpm-payment-button\">    <div id=\"swpm-button-wrapper-2040\" class=\"swpm-button-wrapper swpm-paypal-subscription-button-wrapper\">\n\n    <!-- PayPal button container where the button will be rendered -->\n    <div id=\"swpm_paypal_button_0\" style=\"width: 300px;\"><\/div>\n    <!-- Some additiona hidden input fields -->\n    <input type=\"hidden\" id=\"swpm_paypal_button_0-custom-field\" name=\"custom\" value=\"subsc_ref=2&amp;user_ip=216.73.216.172\">\n\n    <script type=\"text\/javascript\">\n        document.addEventListener( \"swpm_paypal_sdk_subscriptions_loaded\", function() { \n            \/\/Anything that goes here will only be executed after the PayPal SDK is loaded.\n\n            const paypalSubButtonsComponent = swpm_paypal_subscriptions.Buttons({\n                \/\/ optional styling for buttons\n                \/\/ https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/buttons-style-guide\/\n                style: {\n                    color: 'blue',\n                    shape: 'rect',\n                    height: 35,\n                    label: 'subscribe',\n                    layout: 'vertical',\n                },\n    \n                \/\/ Handle the createSubscription call\n                createSubscription: async function(data, actions) {\n                    \/\/ console.log('createSubscription call triggered. Data: ' + JSON.stringify(data));\n\n                    \/\/We will send ajax request that will create the subscription from the server side using PayPal API.\n                    let pp_sub_bn_data = {};\n                    pp_sub_bn_data.button_id = '2040';\n                    pp_sub_bn_data.on_page_button_id = 'swpm_paypal_button_0';\n                    pp_sub_bn_data.item_name = 'Subscription';\n                    let post_data = 'action=swpm_pp_create_subscription&data=' + JSON.stringify(pp_sub_bn_data) + '&_wpnonce=5dd53e3802';\n                    try {\n                        \/\/ Using fetch for AJAX request. This is supported in all modern browsers.\n                        const response = await fetch(\"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\", {\n                            method: \"post\",\n                            headers: {\n                                'Content-Type': 'application\/x-www-form-urlencoded'\n                            },\n                            body: post_data\n                        });\n\n                        const response_data = await response.json();\n\n                        if (response_data.subscription_id) {\n                            console.log('Create-subscription API call to PayPal completed successfully.');\n                            \/\/If we need to see the details, uncomment the following line.\n                            \/\/console.log('Order data: ' + JSON.stringify(response_data.sub_data));\n\n                            \/\/Return the subscription ID.\n                            return response_data.subscription_id;\n                        } else {\n                            const error_message = JSON.stringify(response_data);\n                            console.error('Error occurred during the create-subscription API call to PayPal. ' + error_message);\n                            throw new Error(error_message);\n                        }\n                    } catch (error) {\n                        console.error(error);\n                        alert('Could not initiate PayPal subscription...\\n\\n' + JSON.stringify(error));\n                    }\n                },\n    \n                \/\/ Notify the buyer that the subscription is successful\n                onApprove: function(data, actions) {\n                    console.log('Successfully created a subscription.');\n                    \/\/console.log(JSON.stringify(data));\n\n                    \/\/Show the spinner while we process this transaction.\n                    const pp_button_container = document.getElementById('swpm_paypal_button_0');\n                    const pp_button_container_wrapper = document.getElementById('swpm-button-wrapper-2040');\n                    const pp_button_spinner_container = pp_button_container_wrapper.querySelector('.swpm-pp-button-spinner-container');\n                    pp_button_container.style.display = 'none'; \/\/Hide the buttons\n                    pp_button_spinner_container.style.display = 'inline-block'; \/\/Show the spinner.\n\n                    \/\/Get the subscription details and send AJAX request to process the transaction.\n                    actions.subscription.get().then( async function( txn_data ) {\n                        \/\/console.log( 'Subscription details: ' + JSON.stringify( txn_data ) );\n\n                        \/\/Ajax request to process the transaction. This will process it similar to how an IPN request is handled.\n                        const custom = document.getElementById('swpm_paypal_button_0-custom-field').value;\n                        data.custom_field = custom;\n                        data.button_id = '2040';\n                        data.on_page_button_id = 'swpm_paypal_button_0';\n                        data.item_name = 'Subscription';\n\n                        const post_data = new URLSearchParams({\n                            action: 'swpm_onapprove_process_subscription',\n                            data: JSON.stringify(data),\n                            txn_data: JSON.stringify(txn_data),\n                            _wpnonce: '5dd53e3802',\n                        }).toString();\n\n                        try {\n                            const requestUrl = \"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\";\n                            const resp = await fetch( requestUrl, {\n                                method: \"post\",\n                                headers: {\n                                    'Content-Type': 'application\/x-www-form-urlencoded'\n                                },\n                                body: post_data\n                            });\n\n                            const response = await resp.json();\n\n                            \/\/console.log( 'Response from the server: ' + JSON.stringify( response ) );\n                            if ( response.success ) {\n\n                                \/\/Redirect to the Thank you page or Registration page URL if it is set.\n                                const return_url = response.redirect_url || '';\n                                if( return_url ){\n                                    \/\/redirect to the URL.\n                                    console.log('Redirecting to the Thank you page URL: ' + return_url);\n                                    window.location.href = return_url;\n                                    return;\n                                }\n\n                                \/\/No return URL is set. Just show a success message.\n                                \/\/Important Note: any alert message will block the normal PayPal popup window flow. So we want to show the message on the page instead of using alert.\n                                txn_success_msg = 'Transaction completed successfully!';\n                                const swpm_btn_wrapper_div = document.getElementById('swpm-button-wrapper-2040');\n                                if (swpm_btn_wrapper_div) {\n                                    \/\/ Remove any previous message if it exists\n                                    const old_msg_div = swpm_btn_wrapper_div.querySelector('.swpm-ppcp-txn-success-message');\n                                    if (old_msg_div) old_msg_div.remove();\n\n                                    \/\/ Create new message div\n                                    const new_msg_div = document.createElement('div');\n                                    new_msg_div.className = 'swpm-ppcp-txn-success-message';\n                                    new_msg_div.textContent = txn_success_msg;\n\n                                    \/\/Insert the message div before the button.\n                                    const firstChild = swpm_btn_wrapper_div.firstChild;\n                                    swpm_btn_wrapper_div.insertBefore(new_msg_div, firstChild);\n                                }\n\n                                \/\/ Trigger a event on subscription complete \n                                document.dispatchEvent(new Event('swpm_paypal_subscriptions_complete'));\n                        \n                            } else {\n                                \/\/Error response from the AJAX IPN hanler. Throw error.\n                                throw new Error(response.err_msg);\n                            }\n\n                            \/\/Return the button and the spinner back to their orignal display state.\n                            pp_button_container.style.display = 'block'; \/\/ Show the buttons\n                            pp_button_spinner_container.style.display = 'none'; \/\/ Hide the spinner\n\n                        } catch (error) {\n                            \/\/ Show the error message.\n                            alert(error.message);\n                            console.error( error.message );\n                        }\n                    });\n                },\n    \n                \/\/ handle unrecoverable errors\n                onError: function(err) {\n                    console.error('An error prevented the user from checking out with PayPal. ' + JSON.stringify(err));\n                    alert( 'Error occurred during PayPal checkout process.\\n\\n' + JSON.stringify(err) );\n                }\n            });\n    \n            paypalSubButtonsComponent\n                .render('#swpm_paypal_button_0')\n                .catch((err) => {\n                    console.error('PayPal Buttons failed to render');\n                });\n        });\n    <\/script>\n    <style>\n        @keyframes swpm-pp-button-spinner {\n            to {transform: rotate(360deg);}\n        }\n        .swpm-pp-button-spinner {\n            margin: 0 auto;\n            text-indent: -9999px;\n            vertical-align: middle;\n            box-sizing: border-box;\n            position: relative;\n            width: 60px;\n            height: 60px;\n            border-radius: 50%;\n            border: 5px solid #ccc;\n            border-top-color: #0070ba;\n            animation: swpm-pp-button-spinner .6s linear infinite;\n        }\n        .swpm-pp-button-spinner-container {\n            width: 100%;\n            text-align: center;\n            margin-top:10px;\n            display: none;\n        }\n    <\/style>\n    <div class=\"swpm-pp-button-spinner-container\">\n        <div class=\"swpm-pp-button-spinner\"><\/div>\n    <\/div>\n    <\/div><!-- end of .swpm-button-wrapper -->\n    <\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column has-tertiary-background-color has-background is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-eb524166 wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--30)\">\n<h2 class=\"wp-block-heading\" style=\"margin-top:12px\">$4.50<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:16px;font-size:clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.625), 20px);\">Kvartalni plan<\/h3>\n\n\n\n<p class=\"has-small-font-size\" style=\"margin-top:var(--wp--preset--spacing--40)\">U\u017eivajte u tri meseca neograni\u010denog pristupa svim premijum muzi\u010dkim sadr\u017eajima.<\/p>\n\n\n<div class=\"swpm-payment-button\">    <div id=\"swpm-button-wrapper-2048\" class=\"swpm-button-wrapper swpm-paypal-subscription-button-wrapper\">\n\n    <!-- PayPal button container where the button will be rendered -->\n    <div id=\"swpm_paypal_button_1\" style=\"width: 300px;\"><\/div>\n    <!-- Some additiona hidden input fields -->\n    <input type=\"hidden\" id=\"swpm_paypal_button_1-custom-field\" name=\"custom\" value=\"subsc_ref=2&amp;user_ip=216.73.216.172\">\n\n    <script type=\"text\/javascript\">\n        document.addEventListener( \"swpm_paypal_sdk_subscriptions_loaded\", function() { \n            \/\/Anything that goes here will only be executed after the PayPal SDK is loaded.\n\n            const paypalSubButtonsComponent = swpm_paypal_subscriptions.Buttons({\n                \/\/ optional styling for buttons\n                \/\/ https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/buttons-style-guide\/\n                style: {\n                    color: 'silver',\n                    shape: 'rect',\n                    height: 35,\n                    label: 'checkout',\n                    layout: 'vertical',\n                },\n    \n                \/\/ Handle the createSubscription call\n                createSubscription: async function(data, actions) {\n                    \/\/ console.log('createSubscription call triggered. Data: ' + JSON.stringify(data));\n\n                    \/\/We will send ajax request that will create the subscription from the server side using PayPal API.\n                    let pp_sub_bn_data = {};\n                    pp_sub_bn_data.button_id = '2048';\n                    pp_sub_bn_data.on_page_button_id = 'swpm_paypal_button_1';\n                    pp_sub_bn_data.item_name = 'Subscription - 3 months';\n                    let post_data = 'action=swpm_pp_create_subscription&data=' + JSON.stringify(pp_sub_bn_data) + '&_wpnonce=1cdb44db69';\n                    try {\n                        \/\/ Using fetch for AJAX request. This is supported in all modern browsers.\n                        const response = await fetch(\"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\", {\n                            method: \"post\",\n                            headers: {\n                                'Content-Type': 'application\/x-www-form-urlencoded'\n                            },\n                            body: post_data\n                        });\n\n                        const response_data = await response.json();\n\n                        if (response_data.subscription_id) {\n                            console.log('Create-subscription API call to PayPal completed successfully.');\n                            \/\/If we need to see the details, uncomment the following line.\n                            \/\/console.log('Order data: ' + JSON.stringify(response_data.sub_data));\n\n                            \/\/Return the subscription ID.\n                            return response_data.subscription_id;\n                        } else {\n                            const error_message = JSON.stringify(response_data);\n                            console.error('Error occurred during the create-subscription API call to PayPal. ' + error_message);\n                            throw new Error(error_message);\n                        }\n                    } catch (error) {\n                        console.error(error);\n                        alert('Could not initiate PayPal subscription...\\n\\n' + JSON.stringify(error));\n                    }\n                },\n    \n                \/\/ Notify the buyer that the subscription is successful\n                onApprove: function(data, actions) {\n                    console.log('Successfully created a subscription.');\n                    \/\/console.log(JSON.stringify(data));\n\n                    \/\/Show the spinner while we process this transaction.\n                    const pp_button_container = document.getElementById('swpm_paypal_button_1');\n                    const pp_button_container_wrapper = document.getElementById('swpm-button-wrapper-2048');\n                    const pp_button_spinner_container = pp_button_container_wrapper.querySelector('.swpm-pp-button-spinner-container');\n                    pp_button_container.style.display = 'none'; \/\/Hide the buttons\n                    pp_button_spinner_container.style.display = 'inline-block'; \/\/Show the spinner.\n\n                    \/\/Get the subscription details and send AJAX request to process the transaction.\n                    actions.subscription.get().then( async function( txn_data ) {\n                        \/\/console.log( 'Subscription details: ' + JSON.stringify( txn_data ) );\n\n                        \/\/Ajax request to process the transaction. This will process it similar to how an IPN request is handled.\n                        const custom = document.getElementById('swpm_paypal_button_1-custom-field').value;\n                        data.custom_field = custom;\n                        data.button_id = '2048';\n                        data.on_page_button_id = 'swpm_paypal_button_1';\n                        data.item_name = 'Subscription - 3 months';\n\n                        const post_data = new URLSearchParams({\n                            action: 'swpm_onapprove_process_subscription',\n                            data: JSON.stringify(data),\n                            txn_data: JSON.stringify(txn_data),\n                            _wpnonce: '1cdb44db69',\n                        }).toString();\n\n                        try {\n                            const requestUrl = \"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\";\n                            const resp = await fetch( requestUrl, {\n                                method: \"post\",\n                                headers: {\n                                    'Content-Type': 'application\/x-www-form-urlencoded'\n                                },\n                                body: post_data\n                            });\n\n                            const response = await resp.json();\n\n                            \/\/console.log( 'Response from the server: ' + JSON.stringify( response ) );\n                            if ( response.success ) {\n\n                                \/\/Redirect to the Thank you page or Registration page URL if it is set.\n                                const return_url = response.redirect_url || '';\n                                if( return_url ){\n                                    \/\/redirect to the URL.\n                                    console.log('Redirecting to the Thank you page URL: ' + return_url);\n                                    window.location.href = return_url;\n                                    return;\n                                }\n\n                                \/\/No return URL is set. Just show a success message.\n                                \/\/Important Note: any alert message will block the normal PayPal popup window flow. So we want to show the message on the page instead of using alert.\n                                txn_success_msg = 'Transaction completed successfully!';\n                                const swpm_btn_wrapper_div = document.getElementById('swpm-button-wrapper-2048');\n                                if (swpm_btn_wrapper_div) {\n                                    \/\/ Remove any previous message if it exists\n                                    const old_msg_div = swpm_btn_wrapper_div.querySelector('.swpm-ppcp-txn-success-message');\n                                    if (old_msg_div) old_msg_div.remove();\n\n                                    \/\/ Create new message div\n                                    const new_msg_div = document.createElement('div');\n                                    new_msg_div.className = 'swpm-ppcp-txn-success-message';\n                                    new_msg_div.textContent = txn_success_msg;\n\n                                    \/\/Insert the message div before the button.\n                                    const firstChild = swpm_btn_wrapper_div.firstChild;\n                                    swpm_btn_wrapper_div.insertBefore(new_msg_div, firstChild);\n                                }\n\n                                \/\/ Trigger a event on subscription complete \n                                document.dispatchEvent(new Event('swpm_paypal_subscriptions_complete'));\n                        \n                            } else {\n                                \/\/Error response from the AJAX IPN hanler. Throw error.\n                                throw new Error(response.err_msg);\n                            }\n\n                            \/\/Return the button and the spinner back to their orignal display state.\n                            pp_button_container.style.display = 'block'; \/\/ Show the buttons\n                            pp_button_spinner_container.style.display = 'none'; \/\/ Hide the spinner\n\n                        } catch (error) {\n                            \/\/ Show the error message.\n                            alert(error.message);\n                            console.error( error.message );\n                        }\n                    });\n                },\n    \n                \/\/ handle unrecoverable errors\n                onError: function(err) {\n                    console.error('An error prevented the user from checking out with PayPal. ' + JSON.stringify(err));\n                    alert( 'Error occurred during PayPal checkout process.\\n\\n' + JSON.stringify(err) );\n                }\n            });\n    \n            paypalSubButtonsComponent\n                .render('#swpm_paypal_button_1')\n                .catch((err) => {\n                    console.error('PayPal Buttons failed to render');\n                });\n        });\n    <\/script>\n    <style>\n        @keyframes swpm-pp-button-spinner {\n            to {transform: rotate(360deg);}\n        }\n        .swpm-pp-button-spinner {\n            margin: 0 auto;\n            text-indent: -9999px;\n            vertical-align: middle;\n            box-sizing: border-box;\n            position: relative;\n            width: 60px;\n            height: 60px;\n            border-radius: 50%;\n            border: 5px solid #ccc;\n            border-top-color: #0070ba;\n            animation: swpm-pp-button-spinner .6s linear infinite;\n        }\n        .swpm-pp-button-spinner-container {\n            width: 100%;\n            text-align: center;\n            margin-top:10px;\n            display: none;\n        }\n    <\/style>\n    <div class=\"swpm-pp-button-spinner-container\">\n        <div class=\"swpm-pp-button-spinner\"><\/div>\n    <\/div>\n    <\/div><!-- end of .swpm-button-wrapper -->\n    <\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column has-tertiary-background-color has-background is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-eb524166 wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--30)\">\n<h2 class=\"wp-block-heading\" style=\"margin-top:12px\">$0.50<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:16px;font-size:clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.625), 20px);\">Besplatan sedmodnevni period<\/h3>\n\n\n\n<p class=\"has-small-font-size\" style=\"margin-top:var(--wp--preset--spacing--40)\">Isprobajte sve funkcije bez rizika pre nego \u0161to se obave\u017eete na pretplatu.<\/p>\n\n\n<div class=\"swpm-payment-button\">    <div id=\"swpm-button-wrapper-2049\" class=\"swpm-button-wrapper swpm-paypal-subscription-button-wrapper\">\n\n    <!-- PayPal button container where the button will be rendered -->\n    <div id=\"swpm_paypal_button_2\" style=\"width: 300px;\"><\/div>\n    <!-- Some additiona hidden input fields -->\n    <input type=\"hidden\" id=\"swpm_paypal_button_2-custom-field\" name=\"custom\" value=\"subsc_ref=4&amp;user_ip=216.73.216.172\">\n\n    <script type=\"text\/javascript\">\n        document.addEventListener( \"swpm_paypal_sdk_subscriptions_loaded\", function() { \n            \/\/Anything that goes here will only be executed after the PayPal SDK is loaded.\n\n            const paypalSubButtonsComponent = swpm_paypal_subscriptions.Buttons({\n                \/\/ optional styling for buttons\n                \/\/ https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/buttons-style-guide\/\n                style: {\n                    color: 'white',\n                    shape: 'rect',\n                    height: 35,\n                    label: 'paypal',\n                    layout: 'vertical',\n                },\n    \n                \/\/ Handle the createSubscription call\n                createSubscription: async function(data, actions) {\n                    \/\/ console.log('createSubscription call triggered. Data: ' + JSON.stringify(data));\n\n                    \/\/We will send ajax request that will create the subscription from the server side using PayPal API.\n                    let pp_sub_bn_data = {};\n                    pp_sub_bn_data.button_id = '2049';\n                    pp_sub_bn_data.on_page_button_id = 'swpm_paypal_button_2';\n                    pp_sub_bn_data.item_name = 'Paid Trial';\n                    let post_data = 'action=swpm_pp_create_subscription&data=' + JSON.stringify(pp_sub_bn_data) + '&_wpnonce=1cbd9cda00';\n                    try {\n                        \/\/ Using fetch for AJAX request. This is supported in all modern browsers.\n                        const response = await fetch(\"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\", {\n                            method: \"post\",\n                            headers: {\n                                'Content-Type': 'application\/x-www-form-urlencoded'\n                            },\n                            body: post_data\n                        });\n\n                        const response_data = await response.json();\n\n                        if (response_data.subscription_id) {\n                            console.log('Create-subscription API call to PayPal completed successfully.');\n                            \/\/If we need to see the details, uncomment the following line.\n                            \/\/console.log('Order data: ' + JSON.stringify(response_data.sub_data));\n\n                            \/\/Return the subscription ID.\n                            return response_data.subscription_id;\n                        } else {\n                            const error_message = JSON.stringify(response_data);\n                            console.error('Error occurred during the create-subscription API call to PayPal. ' + error_message);\n                            throw new Error(error_message);\n                        }\n                    } catch (error) {\n                        console.error(error);\n                        alert('Could not initiate PayPal subscription...\\n\\n' + JSON.stringify(error));\n                    }\n                },\n    \n                \/\/ Notify the buyer that the subscription is successful\n                onApprove: function(data, actions) {\n                    console.log('Successfully created a subscription.');\n                    \/\/console.log(JSON.stringify(data));\n\n                    \/\/Show the spinner while we process this transaction.\n                    const pp_button_container = document.getElementById('swpm_paypal_button_2');\n                    const pp_button_container_wrapper = document.getElementById('swpm-button-wrapper-2049');\n                    const pp_button_spinner_container = pp_button_container_wrapper.querySelector('.swpm-pp-button-spinner-container');\n                    pp_button_container.style.display = 'none'; \/\/Hide the buttons\n                    pp_button_spinner_container.style.display = 'inline-block'; \/\/Show the spinner.\n\n                    \/\/Get the subscription details and send AJAX request to process the transaction.\n                    actions.subscription.get().then( async function( txn_data ) {\n                        \/\/console.log( 'Subscription details: ' + JSON.stringify( txn_data ) );\n\n                        \/\/Ajax request to process the transaction. This will process it similar to how an IPN request is handled.\n                        const custom = document.getElementById('swpm_paypal_button_2-custom-field').value;\n                        data.custom_field = custom;\n                        data.button_id = '2049';\n                        data.on_page_button_id = 'swpm_paypal_button_2';\n                        data.item_name = 'Paid Trial';\n\n                        const post_data = new URLSearchParams({\n                            action: 'swpm_onapprove_process_subscription',\n                            data: JSON.stringify(data),\n                            txn_data: JSON.stringify(txn_data),\n                            _wpnonce: '1cbd9cda00',\n                        }).toString();\n\n                        try {\n                            const requestUrl = \"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\";\n                            const resp = await fetch( requestUrl, {\n                                method: \"post\",\n                                headers: {\n                                    'Content-Type': 'application\/x-www-form-urlencoded'\n                                },\n                                body: post_data\n                            });\n\n                            const response = await resp.json();\n\n                            \/\/console.log( 'Response from the server: ' + JSON.stringify( response ) );\n                            if ( response.success ) {\n\n                                \/\/Redirect to the Thank you page or Registration page URL if it is set.\n                                const return_url = response.redirect_url || '';\n                                if( return_url ){\n                                    \/\/redirect to the URL.\n                                    console.log('Redirecting to the Thank you page URL: ' + return_url);\n                                    window.location.href = return_url;\n                                    return;\n                                }\n\n                                \/\/No return URL is set. Just show a success message.\n                                \/\/Important Note: any alert message will block the normal PayPal popup window flow. So we want to show the message on the page instead of using alert.\n                                txn_success_msg = 'Transaction completed successfully!';\n                                const swpm_btn_wrapper_div = document.getElementById('swpm-button-wrapper-2049');\n                                if (swpm_btn_wrapper_div) {\n                                    \/\/ Remove any previous message if it exists\n                                    const old_msg_div = swpm_btn_wrapper_div.querySelector('.swpm-ppcp-txn-success-message');\n                                    if (old_msg_div) old_msg_div.remove();\n\n                                    \/\/ Create new message div\n                                    const new_msg_div = document.createElement('div');\n                                    new_msg_div.className = 'swpm-ppcp-txn-success-message';\n                                    new_msg_div.textContent = txn_success_msg;\n\n                                    \/\/Insert the message div before the button.\n                                    const firstChild = swpm_btn_wrapper_div.firstChild;\n                                    swpm_btn_wrapper_div.insertBefore(new_msg_div, firstChild);\n                                }\n\n                                \/\/ Trigger a event on subscription complete \n                                document.dispatchEvent(new Event('swpm_paypal_subscriptions_complete'));\n                        \n                            } else {\n                                \/\/Error response from the AJAX IPN hanler. Throw error.\n                                throw new Error(response.err_msg);\n                            }\n\n                            \/\/Return the button and the spinner back to their orignal display state.\n                            pp_button_container.style.display = 'block'; \/\/ Show the buttons\n                            pp_button_spinner_container.style.display = 'none'; \/\/ Hide the spinner\n\n                        } catch (error) {\n                            \/\/ Show the error message.\n                            alert(error.message);\n                            console.error( error.message );\n                        }\n                    });\n                },\n    \n                \/\/ handle unrecoverable errors\n                onError: function(err) {\n                    console.error('An error prevented the user from checking out with PayPal. ' + JSON.stringify(err));\n                    alert( 'Error occurred during PayPal checkout process.\\n\\n' + JSON.stringify(err) );\n                }\n            });\n    \n            paypalSubButtonsComponent\n                .render('#swpm_paypal_button_2')\n                .catch((err) => {\n                    console.error('PayPal Buttons failed to render');\n                });\n        });\n    <\/script>\n    <style>\n        @keyframes swpm-pp-button-spinner {\n            to {transform: rotate(360deg);}\n        }\n        .swpm-pp-button-spinner {\n            margin: 0 auto;\n            text-indent: -9999px;\n            vertical-align: middle;\n            box-sizing: border-box;\n            position: relative;\n            width: 60px;\n            height: 60px;\n            border-radius: 50%;\n            border: 5px solid #ccc;\n            border-top-color: #0070ba;\n            animation: swpm-pp-button-spinner .6s linear infinite;\n        }\n        .swpm-pp-button-spinner-container {\n            width: 100%;\n            text-align: center;\n            margin-top:10px;\n            display: none;\n        }\n    <\/style>\n    <div class=\"swpm-pp-button-spinner-container\">\n        <div class=\"swpm-pp-button-spinner\"><\/div>\n    <\/div>\n    <\/div><!-- end of .swpm-button-wrapper -->\n    <\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull has-tertiary-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-9b19db8b wp-block-group-is-layout-constrained\" style=\"margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--30)\">\n<div class=\"wp-block-group is-content-justification-center is-nowrap is-layout-flex wp-container-core-group-is-layout-f2b46e8c wp-block-group-is-layout-flex wp-container-2 is-position-sticky\" style=\"margin-bottom:-64px\">\n<div class=\"wp-block-group has-border-color has-primary-border-color has-background-background-color has-background wp-container-content-3cb39bf3 is-content-justification-center is-nowrap is-layout-flex wp-container-core-group-is-layout-cf138b5d wp-block-group-is-layout-flex\" style=\"border-width:6px;border-radius:100px;min-height:128px;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<figure class=\"wp-block-image aligncenter size-large wp-duotone-varpresetduotonesecondary-and-primary-1\"><img decoding=\"async\" src=\"data:image\/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iOTZweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSI5NnB4IiBmaWxsPSIjMWUxZTFlIj48cGF0aCBkPSJtMzg1LTQxMiAzNi0xMTUtOTUtNzRoMTE2bDM4LTExOSAzNyAxMTloMTE3bC05NSA3NCAzNSAxMTUtOTQtNzEtOTUgNzFaTTI0NC00MHYtMzA0cS00NS00Ny02NC41LTEwM1QxNjAtNTYwcTAtMTM2IDkyLTIyOHQyMjgtOTJxMTM2IDAgMjI4IDkydDkyIDIyOHEwIDU3LTE5LjUgMTEzVDcxNi0zNDR2MzA0bC0yMzYtNzktMjM2IDc5Wm0yMzYtMjYwcTEwOSAwIDE4NC41LTc1LjVUNzQwLTU2MHEwLTEwOS03NS41LTE4NC41VDQ4MC04MjBxLTEwOSAwLTE4NC41IDc1LjVUMjIwLTU2MHEwIDEwOSA3NS41IDE4NC41VDQ4MC0zMDBaTTMwNC0xMjRsMTc2LTU1IDE3NiA1NXYtMTcxcS00MCAyOS04NiA0MnQtOTAgMTNxLTQ0IDAtOTAtMTN0LTg2LTQydjE3MVptMTc2LTg2WiIvPjwvc3ZnPg==\" alt=\"\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-background-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-0bec9cbd wp-block-group-is-layout-constrained\" style=\"border-radius:4px;padding-top:96px;padding-right:var(--wp--preset--spacing--40);padding-bottom:64px;padding-left:var(--wp--preset--spacing--40)\">\n<h2 class=\"wp-block-heading has-text-align-center has-large-font-size\">Va\u0161e zadovoljstvo, na\u0161a posve\u0107enost<\/h2>\n\n\n\n<p class=\"has-text-align-center\" style=\"margin-top:16px\">Discover our clear <a href=\"https:\/\/www.learn-music-online.com\/sr\/refund_returns\/\" title=\"\">refund policy<\/a>, promising quick support and easy refunds to keep your subscription worry-free and enjoyable.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull has-background-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-7276a2bb wp-block-group-is-layout-constrained\" style=\"margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--30)\">\n<div class=\"wp-block-columns alignwide has-tertiary-background-color has-background is-layout-flex wp-container-core-columns-is-layout-7c9548a8 wp-block-columns-is-layout-flex\" style=\"padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">\n<div class=\"wp-block-column is-vertically-aligned-stretch is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<div class=\"wp-block-cover\" style=\"min-height:100%;aspect-ratio:unset;\"><img loading=\"lazy\" decoding=\"async\" width=\"1440\" height=\"960\" class=\"wp-block-cover__image-background wp-image-2051\" alt=\"\" src=\"https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2025\/11\/07555813668be08e0177781ebad5cc7641b04089.jpg\" data-object-fit=\"cover\" srcset=\"https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2025\/11\/07555813668be08e0177781ebad5cc7641b04089.jpg 1440w, https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2025\/11\/07555813668be08e0177781ebad5cc7641b04089-300x200.jpg 300w, https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2025\/11\/07555813668be08e0177781ebad5cc7641b04089-1024x683.jpg 1024w, https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2025\/11\/07555813668be08e0177781ebad5cc7641b04089-768x512.jpg 768w, https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2025\/11\/07555813668be08e0177781ebad5cc7641b04089-18x12.jpg 18w\" sizes=\"auto, (max-width: 1440px) 100vw, 1440px\" \/><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim-0 has-background-dim\"><\/span><div class=\"wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow\">\n<div style=\"height:240px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-301020a0 wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">\n<h2 class=\"wp-block-heading has-large-font-size\">Pretplatite se sada za potpuni u\u010deni\u010dki pristup<\/h2>\n\n\n\n<p style=\"margin-top:16px\">Otklju\u010dajte sve interaktivne lekcije i kurseve sa notnim zapisom uz va\u0161u u\u010deni\u010dku pretplatu ve\u0107 danas za samo 7,5 dolara mese\u010dno.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-left\" style=\"margin-top:12px\">$7.50<\/h2>\n\n\n<div class=\"swpm-payment-button\">    <div id=\"swpm-button-wrapper-2269\" class=\"swpm-button-wrapper swpm-paypal-subscription-button-wrapper\">\n\n    <!-- PayPal button container where the button will be rendered -->\n    <div id=\"swpm_paypal_button_3\" style=\"width: 300px;\"><\/div>\n    <!-- Some additiona hidden input fields -->\n    <input type=\"hidden\" id=\"swpm_paypal_button_3-custom-field\" name=\"custom\" value=\"subsc_ref=6&amp;user_ip=216.73.216.172\">\n\n    <script type=\"text\/javascript\">\n        document.addEventListener( \"swpm_paypal_sdk_subscriptions_loaded\", function() { \n            \/\/Anything that goes here will only be executed after the PayPal SDK is loaded.\n\n            const paypalSubButtonsComponent = swpm_paypal_subscriptions.Buttons({\n                \/\/ optional styling for buttons\n                \/\/ https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/buttons-style-guide\/\n                style: {\n                    color: 'blue',\n                    shape: 'rect',\n                    height: 35,\n                    label: 'checkout',\n                    layout: 'vertical',\n                },\n    \n                \/\/ Handle the createSubscription call\n                createSubscription: async function(data, actions) {\n                    \/\/ console.log('createSubscription call triggered. Data: ' + JSON.stringify(data));\n\n                    \/\/We will send ajax request that will create the subscription from the server side using PayPal API.\n                    let pp_sub_bn_data = {};\n                    pp_sub_bn_data.button_id = '2269';\n                    pp_sub_bn_data.on_page_button_id = 'swpm_paypal_button_3';\n                    pp_sub_bn_data.item_name = 'Student';\n                    let post_data = 'action=swpm_pp_create_subscription&data=' + JSON.stringify(pp_sub_bn_data) + '&_wpnonce=0a0e323b9f';\n                    try {\n                        \/\/ Using fetch for AJAX request. This is supported in all modern browsers.\n                        const response = await fetch(\"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\", {\n                            method: \"post\",\n                            headers: {\n                                'Content-Type': 'application\/x-www-form-urlencoded'\n                            },\n                            body: post_data\n                        });\n\n                        const response_data = await response.json();\n\n                        if (response_data.subscription_id) {\n                            console.log('Create-subscription API call to PayPal completed successfully.');\n                            \/\/If we need to see the details, uncomment the following line.\n                            \/\/console.log('Order data: ' + JSON.stringify(response_data.sub_data));\n\n                            \/\/Return the subscription ID.\n                            return response_data.subscription_id;\n                        } else {\n                            const error_message = JSON.stringify(response_data);\n                            console.error('Error occurred during the create-subscription API call to PayPal. ' + error_message);\n                            throw new Error(error_message);\n                        }\n                    } catch (error) {\n                        console.error(error);\n                        alert('Could not initiate PayPal subscription...\\n\\n' + JSON.stringify(error));\n                    }\n                },\n    \n                \/\/ Notify the buyer that the subscription is successful\n                onApprove: function(data, actions) {\n                    console.log('Successfully created a subscription.');\n                    \/\/console.log(JSON.stringify(data));\n\n                    \/\/Show the spinner while we process this transaction.\n                    const pp_button_container = document.getElementById('swpm_paypal_button_3');\n                    const pp_button_container_wrapper = document.getElementById('swpm-button-wrapper-2269');\n                    const pp_button_spinner_container = pp_button_container_wrapper.querySelector('.swpm-pp-button-spinner-container');\n                    pp_button_container.style.display = 'none'; \/\/Hide the buttons\n                    pp_button_spinner_container.style.display = 'inline-block'; \/\/Show the spinner.\n\n                    \/\/Get the subscription details and send AJAX request to process the transaction.\n                    actions.subscription.get().then( async function( txn_data ) {\n                        \/\/console.log( 'Subscription details: ' + JSON.stringify( txn_data ) );\n\n                        \/\/Ajax request to process the transaction. This will process it similar to how an IPN request is handled.\n                        const custom = document.getElementById('swpm_paypal_button_3-custom-field').value;\n                        data.custom_field = custom;\n                        data.button_id = '2269';\n                        data.on_page_button_id = 'swpm_paypal_button_3';\n                        data.item_name = 'Student';\n\n                        const post_data = new URLSearchParams({\n                            action: 'swpm_onapprove_process_subscription',\n                            data: JSON.stringify(data),\n                            txn_data: JSON.stringify(txn_data),\n                            _wpnonce: '0a0e323b9f',\n                        }).toString();\n\n                        try {\n                            const requestUrl = \"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\";\n                            const resp = await fetch( requestUrl, {\n                                method: \"post\",\n                                headers: {\n                                    'Content-Type': 'application\/x-www-form-urlencoded'\n                                },\n                                body: post_data\n                            });\n\n                            const response = await resp.json();\n\n                            \/\/console.log( 'Response from the server: ' + JSON.stringify( response ) );\n                            if ( response.success ) {\n\n                                \/\/Redirect to the Thank you page or Registration page URL if it is set.\n                                const return_url = response.redirect_url || '';\n                                if( return_url ){\n                                    \/\/redirect to the URL.\n                                    console.log('Redirecting to the Thank you page URL: ' + return_url);\n                                    window.location.href = return_url;\n                                    return;\n                                }\n\n                                \/\/No return URL is set. Just show a success message.\n                                \/\/Important Note: any alert message will block the normal PayPal popup window flow. So we want to show the message on the page instead of using alert.\n                                txn_success_msg = 'Transaction completed successfully!';\n                                const swpm_btn_wrapper_div = document.getElementById('swpm-button-wrapper-2269');\n                                if (swpm_btn_wrapper_div) {\n                                    \/\/ Remove any previous message if it exists\n                                    const old_msg_div = swpm_btn_wrapper_div.querySelector('.swpm-ppcp-txn-success-message');\n                                    if (old_msg_div) old_msg_div.remove();\n\n                                    \/\/ Create new message div\n                                    const new_msg_div = document.createElement('div');\n                                    new_msg_div.className = 'swpm-ppcp-txn-success-message';\n                                    new_msg_div.textContent = txn_success_msg;\n\n                                    \/\/Insert the message div before the button.\n                                    const firstChild = swpm_btn_wrapper_div.firstChild;\n                                    swpm_btn_wrapper_div.insertBefore(new_msg_div, firstChild);\n                                }\n\n                                \/\/ Trigger a event on subscription complete \n                                document.dispatchEvent(new Event('swpm_paypal_subscriptions_complete'));\n                        \n                            } else {\n                                \/\/Error response from the AJAX IPN hanler. Throw error.\n                                throw new Error(response.err_msg);\n                            }\n\n                            \/\/Return the button and the spinner back to their orignal display state.\n                            pp_button_container.style.display = 'block'; \/\/ Show the buttons\n                            pp_button_spinner_container.style.display = 'none'; \/\/ Hide the spinner\n\n                        } catch (error) {\n                            \/\/ Show the error message.\n                            alert(error.message);\n                            console.error( error.message );\n                        }\n                    });\n                },\n    \n                \/\/ handle unrecoverable errors\n                onError: function(err) {\n                    console.error('An error prevented the user from checking out with PayPal. ' + JSON.stringify(err));\n                    alert( 'Error occurred during PayPal checkout process.\\n\\n' + JSON.stringify(err) );\n                }\n            });\n    \n            paypalSubButtonsComponent\n                .render('#swpm_paypal_button_3')\n                .catch((err) => {\n                    console.error('PayPal Buttons failed to render');\n                });\n        });\n    <\/script>\n    <style>\n        @keyframes swpm-pp-button-spinner {\n            to {transform: rotate(360deg);}\n        }\n        .swpm-pp-button-spinner {\n            margin: 0 auto;\n            text-indent: -9999px;\n            vertical-align: middle;\n            box-sizing: border-box;\n            position: relative;\n            width: 60px;\n            height: 60px;\n            border-radius: 50%;\n            border: 5px solid #ccc;\n            border-top-color: #0070ba;\n            animation: swpm-pp-button-spinner .6s linear infinite;\n        }\n        .swpm-pp-button-spinner-container {\n            width: 100%;\n            text-align: center;\n            margin-top:10px;\n            display: none;\n        }\n    <\/style>\n    <div class=\"swpm-pp-button-spinner-container\">\n        <div class=\"swpm-pp-button-spinner\"><\/div>\n    <\/div>\n    <\/div><!-- end of .swpm-button-wrapper -->\n    <\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns alignwide has-tertiary-background-color has-background is-layout-flex wp-container-core-columns-is-layout-7c9548a8 wp-block-columns-is-layout-flex\" style=\"padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">\n<div class=\"wp-block-column is-vertically-aligned-stretch is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<div class=\"wp-block-cover\" style=\"min-height:100%;aspect-ratio:unset;\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"1248\" class=\"wp-block-cover__image-background wp-image-3004\" alt=\"\" src=\"https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2026\/02\/image.jpg\" data-object-fit=\"cover\" srcset=\"https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2026\/02\/image.jpg 832w, https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2026\/02\/image-200x300.jpg 200w, https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2026\/02\/image-683x1024.jpg 683w, https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2026\/02\/image-768x1152.jpg 768w, https:\/\/www.learn-music-online.com\/wp-content\/uploads\/2026\/02\/image-8x12.jpg 8w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim-0 has-background-dim\"><\/span><div class=\"wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow\">\n<div style=\"height:240px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-301020a0 wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">\n<h2 class=\"wp-block-heading has-large-font-size\">Pretplatite se sada za potpuni nastavni\u010dki pristup<\/h2>\n\n\n\n<p style=\"margin-top:16px\">Otklju\u010dajte sve interaktivne lekcije i kurseve sa notnim zapisom uz va\u0161u nastavni\u010dku pretplatu ve\u0107 danas za samo 10 dolara mese\u010dno.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-left\" style=\"margin-top:12px\">$10.00<\/h2>\n\n\n<div class=\"swpm-payment-button\">    <div id=\"swpm-button-wrapper-2266\" class=\"swpm-button-wrapper swpm-paypal-subscription-button-wrapper\">\n\n    <!-- PayPal button container where the button will be rendered -->\n    <div id=\"swpm_paypal_button_4\" style=\"width: 300px;\"><\/div>\n    <!-- Some additiona hidden input fields -->\n    <input type=\"hidden\" id=\"swpm_paypal_button_4-custom-field\" name=\"custom\" value=\"subsc_ref=5&amp;user_ip=216.73.216.172\">\n\n    <script type=\"text\/javascript\">\n        document.addEventListener( \"swpm_paypal_sdk_subscriptions_loaded\", function() { \n            \/\/Anything that goes here will only be executed after the PayPal SDK is loaded.\n\n            const paypalSubButtonsComponent = swpm_paypal_subscriptions.Buttons({\n                \/\/ optional styling for buttons\n                \/\/ https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/buttons-style-guide\/\n                style: {\n                    color: 'blue',\n                    shape: 'rect',\n                    height: 35,\n                    label: 'checkout',\n                    layout: 'vertical',\n                },\n    \n                \/\/ Handle the createSubscription call\n                createSubscription: async function(data, actions) {\n                    \/\/ console.log('createSubscription call triggered. Data: ' + JSON.stringify(data));\n\n                    \/\/We will send ajax request that will create the subscription from the server side using PayPal API.\n                    let pp_sub_bn_data = {};\n                    pp_sub_bn_data.button_id = '2266';\n                    pp_sub_bn_data.on_page_button_id = 'swpm_paypal_button_4';\n                    pp_sub_bn_data.item_name = 'Teacher';\n                    let post_data = 'action=swpm_pp_create_subscription&data=' + JSON.stringify(pp_sub_bn_data) + '&_wpnonce=f12a4605bc';\n                    try {\n                        \/\/ Using fetch for AJAX request. This is supported in all modern browsers.\n                        const response = await fetch(\"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\", {\n                            method: \"post\",\n                            headers: {\n                                'Content-Type': 'application\/x-www-form-urlencoded'\n                            },\n                            body: post_data\n                        });\n\n                        const response_data = await response.json();\n\n                        if (response_data.subscription_id) {\n                            console.log('Create-subscription API call to PayPal completed successfully.');\n                            \/\/If we need to see the details, uncomment the following line.\n                            \/\/console.log('Order data: ' + JSON.stringify(response_data.sub_data));\n\n                            \/\/Return the subscription ID.\n                            return response_data.subscription_id;\n                        } else {\n                            const error_message = JSON.stringify(response_data);\n                            console.error('Error occurred during the create-subscription API call to PayPal. ' + error_message);\n                            throw new Error(error_message);\n                        }\n                    } catch (error) {\n                        console.error(error);\n                        alert('Could not initiate PayPal subscription...\\n\\n' + JSON.stringify(error));\n                    }\n                },\n    \n                \/\/ Notify the buyer that the subscription is successful\n                onApprove: function(data, actions) {\n                    console.log('Successfully created a subscription.');\n                    \/\/console.log(JSON.stringify(data));\n\n                    \/\/Show the spinner while we process this transaction.\n                    const pp_button_container = document.getElementById('swpm_paypal_button_4');\n                    const pp_button_container_wrapper = document.getElementById('swpm-button-wrapper-2266');\n                    const pp_button_spinner_container = pp_button_container_wrapper.querySelector('.swpm-pp-button-spinner-container');\n                    pp_button_container.style.display = 'none'; \/\/Hide the buttons\n                    pp_button_spinner_container.style.display = 'inline-block'; \/\/Show the spinner.\n\n                    \/\/Get the subscription details and send AJAX request to process the transaction.\n                    actions.subscription.get().then( async function( txn_data ) {\n                        \/\/console.log( 'Subscription details: ' + JSON.stringify( txn_data ) );\n\n                        \/\/Ajax request to process the transaction. This will process it similar to how an IPN request is handled.\n                        const custom = document.getElementById('swpm_paypal_button_4-custom-field').value;\n                        data.custom_field = custom;\n                        data.button_id = '2266';\n                        data.on_page_button_id = 'swpm_paypal_button_4';\n                        data.item_name = 'Teacher';\n\n                        const post_data = new URLSearchParams({\n                            action: 'swpm_onapprove_process_subscription',\n                            data: JSON.stringify(data),\n                            txn_data: JSON.stringify(txn_data),\n                            _wpnonce: 'f12a4605bc',\n                        }).toString();\n\n                        try {\n                            const requestUrl = \"https:\/\/www.learn-music-online.com\/wp-admin\/admin-ajax.php\";\n                            const resp = await fetch( requestUrl, {\n                                method: \"post\",\n                                headers: {\n                                    'Content-Type': 'application\/x-www-form-urlencoded'\n                                },\n                                body: post_data\n                            });\n\n                            const response = await resp.json();\n\n                            \/\/console.log( 'Response from the server: ' + JSON.stringify( response ) );\n                            if ( response.success ) {\n\n                                \/\/Redirect to the Thank you page or Registration page URL if it is set.\n                                const return_url = response.redirect_url || '';\n                                if( return_url ){\n                                    \/\/redirect to the URL.\n                                    console.log('Redirecting to the Thank you page URL: ' + return_url);\n                                    window.location.href = return_url;\n                                    return;\n                                }\n\n                                \/\/No return URL is set. Just show a success message.\n                                \/\/Important Note: any alert message will block the normal PayPal popup window flow. So we want to show the message on the page instead of using alert.\n                                txn_success_msg = 'Transaction completed successfully!';\n                                const swpm_btn_wrapper_div = document.getElementById('swpm-button-wrapper-2266');\n                                if (swpm_btn_wrapper_div) {\n                                    \/\/ Remove any previous message if it exists\n                                    const old_msg_div = swpm_btn_wrapper_div.querySelector('.swpm-ppcp-txn-success-message');\n                                    if (old_msg_div) old_msg_div.remove();\n\n                                    \/\/ Create new message div\n                                    const new_msg_div = document.createElement('div');\n                                    new_msg_div.className = 'swpm-ppcp-txn-success-message';\n                                    new_msg_div.textContent = txn_success_msg;\n\n                                    \/\/Insert the message div before the button.\n                                    const firstChild = swpm_btn_wrapper_div.firstChild;\n                                    swpm_btn_wrapper_div.insertBefore(new_msg_div, firstChild);\n                                }\n\n                                \/\/ Trigger a event on subscription complete \n                                document.dispatchEvent(new Event('swpm_paypal_subscriptions_complete'));\n                        \n                            } else {\n                                \/\/Error response from the AJAX IPN hanler. Throw error.\n                                throw new Error(response.err_msg);\n                            }\n\n                            \/\/Return the button and the spinner back to their orignal display state.\n                            pp_button_container.style.display = 'block'; \/\/ Show the buttons\n                            pp_button_spinner_container.style.display = 'none'; \/\/ Hide the spinner\n\n                        } catch (error) {\n                            \/\/ Show the error message.\n                            alert(error.message);\n                            console.error( error.message );\n                        }\n                    });\n                },\n    \n                \/\/ handle unrecoverable errors\n                onError: function(err) {\n                    console.error('An error prevented the user from checking out with PayPal. ' + JSON.stringify(err));\n                    alert( 'Error occurred during PayPal checkout process.\\n\\n' + JSON.stringify(err) );\n                }\n            });\n    \n            paypalSubButtonsComponent\n                .render('#swpm_paypal_button_4')\n                .catch((err) => {\n                    console.error('PayPal Buttons failed to render');\n                });\n        });\n    <\/script>\n    <style>\n        @keyframes swpm-pp-button-spinner {\n            to {transform: rotate(360deg);}\n        }\n        .swpm-pp-button-spinner {\n            margin: 0 auto;\n            text-indent: -9999px;\n            vertical-align: middle;\n            box-sizing: border-box;\n            position: relative;\n            width: 60px;\n            height: 60px;\n            border-radius: 50%;\n            border: 5px solid #ccc;\n            border-top-color: #0070ba;\n            animation: swpm-pp-button-spinner .6s linear infinite;\n        }\n        .swpm-pp-button-spinner-container {\n            width: 100%;\n            text-align: center;\n            margin-top:10px;\n            display: none;\n        }\n    <\/style>\n    <div class=\"swpm-pp-button-spinner-container\">\n        <div class=\"swpm-pp-button-spinner\"><\/div>\n    <\/div>\n    <\/div><!-- end of .swpm-button-wrapper -->\n    <\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Flexible Subscription Plans to Suit Your Music Journey Choose from monthly or three-month subscriptions, unlocking full access to interactive lessons and sheet music courses. $5.00 Monthly Plan Access all interactive lessons with a simple one-month subscription. $4.50 Quarterly Plan Enjoy three months of unlimited access to all premium music content. $0.50 Free 7-Day Trial Try [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2036","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.learn-music-online.com\/sr\/wp-json\/wp\/v2\/pages\/2036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.learn-music-online.com\/sr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.learn-music-online.com\/sr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.learn-music-online.com\/sr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.learn-music-online.com\/sr\/wp-json\/wp\/v2\/comments?post=2036"}],"version-history":[{"count":10,"href":"https:\/\/www.learn-music-online.com\/sr\/wp-json\/wp\/v2\/pages\/2036\/revisions"}],"predecessor-version":[{"id":3068,"href":"https:\/\/www.learn-music-online.com\/sr\/wp-json\/wp\/v2\/pages\/2036\/revisions\/3068"}],"wp:attachment":[{"href":"https:\/\/www.learn-music-online.com\/sr\/wp-json\/wp\/v2\/media?parent=2036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}