{"id":785,"date":"2023-06-08T21:57:49","date_gmt":"2023-06-08T20:57:49","guid":{"rendered":"https:\/\/econstela.com\/start-using-econstela\/"},"modified":"2026-03-03T22:25:16","modified_gmt":"2026-03-03T21:25:16","slug":"membership-join","status":"publish","type":"page","link":"https:\/\/econstela.com\/en\/membership-join\/","title":{"rendered":"Start using eConstela"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; header_font=&#8221;Asap|700|||||||&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h1 style=\"text-align: center;\">Join eConstela<\/h1>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8221;1_3,1_3,1_3&#8243; use_custom_gutter=&#8221;on&#8221; gutter_width=&#8221;2&#8243; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;1_3&#8243; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; custom_padding=&#8221;33px||||false|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#E09900&#8243; border_width_top=&#8221;5px&#8221; border_color_top=&#8221;#E09900&#8243; box_shadow_style=&#8221;preset3&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; text_text_color=&#8221;#e07e33&#8243; header_font=&#8221;Asap|700|||||||&#8221; header_text_align=&#8221;center&#8221; header_text_color=&#8221;#6B6B6B&#8221; background_color=&#8221;#FFFFFF&#8221; text_orientation=&#8221;center&#8221; custom_margin=&#8221;||-1px|||&#8221; custom_padding=&#8221;0px||10px||false|false&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h1>Free<\/h1>\n<p>Private or test use<\/p>\n<h1><span style=\"font-size: xx-large;\"><\/span><\/h1>\n<h1><span style=\"font-size: xx-large;\">0\u20ac<\/span><\/h1>\n<p>[\/et_pb_text][et_pb_divider color=&#8221;#E09900&#8243; divider_style=&#8221;dashed&#8221; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; min_height=&#8221;0px&#8221; custom_margin=&#8221;||-2px|||&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_divider][et_pb_text _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; custom_margin=&#8221;0px||||false|false&#8221; custom_padding=&#8221;0px|20px|0px|20px|true|true&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<ul class=\"pa-bullet-list-good\">\n<li>Free access<\/li>\n<\/ul>\n<ul class=\"pa-bullet-list-bad\" style=\"color: #aa6666;\">\n<li>Logo eConstela&#8221; watermark.<\/li>\n<li>Less frequent updates.<\/li>\n<li>Time limited to 30 minutes.<\/li>\n<li>Doesn&#8217;t save data in the cloud.<\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_button button_url=&#8221;@ET-DC@eyJkeW5hbWljIjp0cnVlLCJjb250ZW50IjoicG9zdF9saW5rX3VybF9wYWdlIiwic2V0dGluZ3MiOnsicG9zdF9pZCI6IjcyIiwiZW5hYmxlX2h0bWwiOiJvZmYifX0=@&#8221; button_text=&#8221;Try it NOW! *&#8221; button_alignment=&#8221;center&#8221; button_alignment_tablet=&#8221;&#8221; button_alignment_phone=&#8221;center&#8221; button_alignment_last_edited=&#8221;on|phone&#8221; _builder_version=&#8221;4.21.0&#8243; _dynamic_attributes=&#8221;button_url&#8221; custom_button=&#8221;on&#8221; button_text_size=&#8221;16px&#8221; button_text_color=&#8221;#ffffff&#8221; button_bg_color=&#8221;#e58a0b&#8221; button_border_width=&#8221;0px&#8221; button_border_radius=&#8221;4px&#8221; button_letter_spacing=&#8221;0px&#8221; button_font=&#8221;|700|||||||&#8221; custom_margin=&#8221;||15px||false|false&#8221; custom_padding=&#8221;11px|30px|11px|30px|true|true&#8221; box_shadow_style=&#8221;preset3&#8243; box_shadow_vertical=&#8221;8px&#8221; box_shadow_blur=&#8221;11px&#8221; box_shadow_spread=&#8221;0px&#8221; locked=&#8221;off&#8221; global_colors_info=&#8221;{}&#8221; custom_css_main_element_last_edited=&#8221;on|phone&#8221; custom_css_main_element_phone=&#8221;float: none;&#8221; custom_css_main_element_tablet=&#8221;float: left;&#8221;][\/et_pb_button][et_pb_text _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; text_orientation=&#8221;center&#8221; min_height=&#8221;41.8px&#8221; custom_margin=&#8221;-10px|||||&#8221; locked=&#8221;off&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p>*Compatible with PC and MacOS browsers<\/p>\n<p>[\/et_pb_text][\/et_pb_column][et_pb_column type=&#8221;1_3&#8243; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; custom_padding=&#8221;33px||||false|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#e02b20&#8243; border_width_top=&#8221;5px&#8221; box_shadow_style=&#8221;preset3&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; text_text_color=&#8221;#ce4f00&#8243; header_font=&#8221;Asap|700|||||||&#8221; header_text_align=&#8221;center&#8221; header_text_color=&#8221;#6B6B6B&#8221; background_color=&#8221;#FFFFFF&#8221; text_orientation=&#8221;center&#8221; custom_margin=&#8221;||-1px|||&#8221; custom_padding=&#8221;0px||10px||false|false&#8221; hover_enabled=&#8221;0&#8243; border_radii=&#8221;off|18px|18px||&#8221; global_colors_info=&#8221;{}&#8221; border_width_all__hover_enabled=&#8221;on|desktop&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h1>Yearly<\/h1>\n<p>Professional use<\/p>\n<h1><span style=\"font-size: xx-large; color: #d6634d;\">120\u20ac<\/span> <span style=\"font-size: small;\">\/year<\/span><\/h1>\n<p><span style=\"font-size: small;\">10\u20ac\/month with annual payment<\/span><\/p>\n<p><span style=\"font-size: small; color: #6b6b6b;\"><\/span><\/p>\n<p>[\/et_pb_text][et_pb_divider color=&#8221;#e02b20&#8243; divider_style=&#8221;dashed&#8221; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; min_height=&#8221;0px&#8221; custom_margin=&#8221;-5px||-26px|||&#8221; custom_padding=&#8221;0px||0px|||&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_divider][et_pb_text _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; custom_margin=&#8221;0px||||false|false&#8221; custom_padding=&#8221;20px|20px|20px|20px|true|true&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<ul class=\"pa-bullet-list-good\">\n<li>Unlimited access for <strong>one year<\/strong><\/li>\n<li>Sessions saved in the cloud<\/li>\n<li>Personalized boards stored in the cloud<\/li>\n<li>Custom logo<\/li>\n<li>Frequent updates<\/li>\n<li>Client support<\/li>\n<\/ul>\n<ul class=\"pa-bullet-list-bad\" style=\"color: #aa6666;\"><\/ul>\n<p style=\"text-align: center;\"><div class=\"swpm-payment-button\">    <div id=\"swpm-button-wrapper-154\" class=\"swpm-button-wrapper swpm-paypal-buy-now-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=16&amp;user_ip=216.73.216.104\">\n\n    <script type=\"text\/javascript\">\n        document.addEventListener( \"swpm_paypal_sdk_loaded\", function() { \n            \/\/Anything that goes here will only be executed after the PayPal SDK is loaded.\n            console.log('PayPal JS SDK is loaded.');\n\n            var js_currency_code = 'EUR';\n            var js_payment_amount = 120;\n            var js_quantity = 1;\n            var js_digital_goods_enabled = 1;\n\n            const paypalButtonsComponent = paypal.Buttons({\n                \/\/ optional styling for buttons\n                \/\/ https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/buttons-style-guide\/\n                style: {\n                    color: 'gold',\n                    shape: 'rect',\n                    height: 35,\n                    label: 'buynow',\n                    layout: 'horizontal',\n                },\n\n                \/\/ Setup the transaction.\n                createOrder: async function() {\n                    \/\/ Create the order in PayPal using the PayPal API.\n                    \/\/ https:\/\/developer.paypal.com\/docs\/checkout\/standard\/integrate\/\n                    \/\/ The server-side Create Order API is used to generate the Order. Then the Order-ID is returned.                    \n                    console.log('Setting up the AJAX request for create-order call.');\n                    let pp_bn_data = {};\n                    pp_bn_data.button_id = '154';\n                    pp_bn_data.on_page_button_id = 'swpm_paypal_button_0';\n                    pp_bn_data.item_name = 'COMPRAR BasicAnual';\n                    let post_data = 'action=swpm_pp_create_order&data=' + JSON.stringify(pp_bn_data) + '&_wpnonce=177371d1a1';\n                    try {\n                        \/\/ Using fetch for AJAX request. This is supported in all modern browsers.\n                        const response = await fetch(\"https:\/\/econstela.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.order_id) {\n                            console.log('Create-order API call to PayPal completed successfully.');\n                            \/\/If we need to see the order details, uncomment the following line.\n                            \/\/const order_data = response_data.order_data;\n                            \/\/console.log('Order data: ' + JSON.stringify(order_data));\n                            return response_data.order_id;\n                        } else {\n                            const error_message = JSON.stringify(response_data);\n                            console.error('Error occurred during the create-order 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 Checkout...\\n\\n' + JSON.stringify(error));\n                    }\n                },\n    \n                \/\/ handle the onApprove event\n                onApprove: async function(data, actions) {\n                    console.log('Successfully created a transaction.');\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-154');\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                    \/\/ Capture the order in PayPal using the PayPal API.\n                    \/\/ https:\/\/developer.paypal.com\/docs\/checkout\/standard\/integrate\/\n                    \/\/ The server-side capture-order API is used. Then the Capture-ID is returned.\n                    console.log('Setting up the AJAX request for capture-order call.');\n                    let pp_bn_data = {};\n                    pp_bn_data.order_id = data.orderID;\n                    pp_bn_data.button_id = '154';\n                    pp_bn_data.on_page_button_id = 'swpm_paypal_button_0';\n                    pp_bn_data.item_name = 'COMPRAR BasicAnual';\n\n                    \/\/Add custom_field data. It is important to encode the custom_field data so it doesn't mess up the data with & character.\n                    const custom_data = document.getElementById('swpm_paypal_button_0-custom-field').value;\n                    pp_bn_data.custom_field = encodeURIComponent(custom_data);\n                    \n                    const post_data = new URLSearchParams({\n                        action: 'swpm_pp_capture_order',\n                        data: JSON.stringify(pp_bn_data),\n                        _wpnonce: '177371d1a1',\n                    }).toString();\n                    \n                    try {\n                        const response = await fetch(\"https:\/\/econstela.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                        const txn_data = response_data.txn_data;\n                        const error_detail = txn_data?.details?.[0];\n                        const error_msg = response_data.error_msg;\/\/Our custom error message.\n                        \/\/ Three cases to handle:\n                        \/\/ (1) Recoverable INSTRUMENT_DECLINED -> call actions.restart()\n                        \/\/ (2) Other non-recoverable errors -> Show a failure message\n                        \/\/ (3) Successful transaction -> Show confirmation or thank you message\n\n                        if (response_data.capture_id) {\n                            \/\/ Successful transaction -> Show confirmation or thank you message\n                            console.log('Capture-order API call to PayPal completed successfully.');\n\n                            \/\/Redirect to the Thank you page or Registration page URL if it is set.\n                            const return_url = response_data.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                            } else {\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-154');\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\n                        } else if (error_detail?.issue === \"INSTRUMENT_DECLINED\") {\n                            \/\/ Recoverable INSTRUMENT_DECLINED -> call actions.restart()\n                            console.log('Recoverable INSTRUMENT_DECLINED error. Calling actions.restart()');\n                            return actions.restart();\n                        } else if ( error_msg && error_msg.trim() !== '' ) {\n                            \/\/Our custom error message from the server.\n                            console.error('Error occurred during PayPal checkout process.');\n                            console.error( error_msg );\n                            alert( error_msg );\n                        } else {\n                            \/\/ Other non-recoverable errors -> Show a failure message\n                            console.error('Non-recoverable error occurred during PayPal checkout process.');\n                            console.error( error_detail );\n                            \/\/alert('Error occurred with the transaction. Enable debug logging to get more details.\\n\\n' + JSON.stringify(error_detail));\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                        console.error(error);\n                        alert('PayPal returned an error! Transaction could not be processed. Enable the debug logging feature to get more details...\\n\\n' + JSON.stringify(error));\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                \/\/ handle onCancel event\n                onCancel: function(data) {\n                    console.log('Checkout operation cancelled by the customer.');\n                    \/\/Return to the parent page which the button does by default.\n                }\n            });\n    \n            paypalButtonsComponent\n                .render('#swpm_paypal_button_0')\n                .catch((err) => {\n                    console.error('PayPal Buttons failed to render');\n                });\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><\/p>\n<p>[\/et_pb_text][\/et_pb_column][et_pb_column type=&#8221;1_3&#8243; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; custom_padding=&#8221;33px||||false|false&#8221; border_radii=&#8221;on|12px|12px|12px|12px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#e02b20&#8243; border_width_top=&#8221;5px&#8221; box_shadow_style=&#8221;preset3&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; text_text_color=&#8221;#ce4f00&#8243; header_font=&#8221;Asap|700|||||||&#8221; header_text_align=&#8221;center&#8221; header_text_color=&#8221;#6B6B6B&#8221; background_color=&#8221;#FFFFFF&#8221; text_orientation=&#8221;center&#8221; custom_margin=&#8221;||-1px|||&#8221; custom_padding=&#8221;0px||10px||false|false&#8221; hover_enabled=&#8221;0&#8243; border_radii=&#8221;off|18px|18px||&#8221; global_colors_info=&#8221;{}&#8221; border_width_all__hover_enabled=&#8221;on|desktop&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h1>Monthly<\/h1>\n<p>Professional use<\/p>\n<h1><span style=\"font-size: xx-large; color: #d6634d;\">12\u20ac<\/span> <span style=\"font-size: small;\">\/ month<\/span><\/h1>\n<p><span style=\"font-size: small;\">Subscription with automatic renewal<\/span><\/p>\n<p><span style=\"font-size: small; color: #6b6b6b;\"><\/span><\/p>\n<p>[\/et_pb_text][et_pb_divider color=&#8221;#e02b20&#8243; divider_style=&#8221;dashed&#8221; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; min_height=&#8221;0px&#8221; custom_margin=&#8221;-5px||-26px|||&#8221; custom_padding=&#8221;0px||0px|||&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_divider][et_pb_text _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; custom_margin=&#8221;0px||||false|false&#8221; custom_padding=&#8221;20px|20px|20px|20px|true|true&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<ul class=\"pa-bullet-list-good\">\n<li>Unlimited access for <strong>one month<\/strong><\/li>\n<li>Sessions saved in the cloud<\/li>\n<li>Personalized boards stored in the cloud<\/li>\n<li>Custom logo<\/li>\n<li>Frequent updates<\/li>\n<li>Client support<\/li>\n<\/ul>\n<ul class=\"pa-bullet-list-bad\" style=\"color: #aa6666;\"><\/ul>\n<p style=\"text-align: center;\"><div class=\"swpm-payment-button\">    <div id=\"swpm-button-wrapper-1290\" 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=17&amp;user_ip=216.73.216.104\">\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: 'gold',\n                    shape: 'rect',\n                    height: 35,\n                    label: 'subscribe',\n                    layout: 'horizontal',\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 = '1290';\n                    pp_sub_bn_data.on_page_button_id = 'swpm_paypal_button_1';\n                    pp_sub_bn_data.item_name = 'Suscripci\u00f3n BasicMensual';\n                    let post_data = 'action=swpm_pp_create_subscription&data=' + JSON.stringify(pp_sub_bn_data) + '&_wpnonce=f986e12c78';\n                    try {\n                        \/\/ Using fetch for AJAX request. This is supported in all modern browsers.\n                        const response = await fetch(\"https:\/\/econstela.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-1290');\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 = '1290';\n                        data.on_page_button_id = 'swpm_paypal_button_1';\n                        data.item_name = 'Suscripci\u00f3n BasicMensual';\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: 'f986e12c78',\n                        }).toString();\n\n                        try {\n                            const requestUrl = \"https:\/\/econstela.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-1290');\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><\/p>\n<p>[\/et_pb_text][et_pb_divider color=&#8221;#e02b20&#8243; divider_style=&#8221;dashed&#8221; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; min_height=&#8221;0px&#8221; custom_margin=&#8221;-5px||-26px|||&#8221; custom_padding=&#8221;0px||0px|||&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_divider][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.21.0&#8243; _module_preset=&#8221;default&#8221; text_orientation=&#8221;center&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p>Need a customized solution? Do not hesitate to write to <a href=\"mailto:econstela.app@gmail.com\" title=\"Send Email\">econstela.app@gmail.com<\/a><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Join eConstelaFree Private or test use 0\u20ac Free access Logo eConstela&#8221; watermark. Less frequent updates. Time limited to 30 minutes. Doesn&#8217;t save data in the cloud. *Compatible with PC and MacOS browsersYearly Professional use 120\u20ac \/year 10\u20ac\/month with annual payment Unlimited access for one year Sessions saved in the cloud Personalized boards stored in the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-785","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"publishpress_future_action":{"enabled":false,"date":"2026-08-08 15:33:58","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"translation_priority","extraData":[]},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/econstela.com\/en\/wp-json\/wp\/v2\/pages\/785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/econstela.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/econstela.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/econstela.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/econstela.com\/en\/wp-json\/wp\/v2\/comments?post=785"}],"version-history":[{"count":11,"href":"https:\/\/econstela.com\/en\/wp-json\/wp\/v2\/pages\/785\/revisions"}],"predecessor-version":[{"id":1420,"href":"https:\/\/econstela.com\/en\/wp-json\/wp\/v2\/pages\/785\/revisions\/1420"}],"wp:attachment":[{"href":"https:\/\/econstela.com\/en\/wp-json\/wp\/v2\/media?parent=785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}