{"id":106020,"date":"2025-04-30T13:09:52","date_gmt":"2025-04-30T11:09:52","guid":{"rendered":"https:\/\/formaciononline.ucavila.es\/pay-with-flywire\/"},"modified":"2025-04-30T13:09:52","modified_gmt":"2025-04-30T11:09:52","slug":"pay-with-flywire","status":"publish","type":"page","link":"https:\/\/formaciononline.ucavila.es\/en\/pay-with-flywire\/","title":{"rendered":"Pay with Flywire"},"content":{"rendered":"        <div id=\"flywire-msg\" class=\"woocommerce-error\" style=\"display: none;\">\n            Page not initialized correctly. Please go back and try again.\n        <\/div>\n\n        <div class=\"fly-button-wrapper\">\n            <button id=\"checkout-button\" disabled>Pay Now<\/button>\n        <\/div>\n        <a href=\"javascript: history.go(-1)\" class=\"fly-back-link\">&laquo; Back<\/a>\n\n        <script type=\"text\/javascript\">\n            jQuery(function ($) {\n                const buttonEl = $('#checkout-button');\n                let checkout = {},\n                    config = {},\n                    paramPairs = (window.location.search).replace(\/^\\?\/, '').split(\"&\");\n\n                paramPairs.reduce((acc, current) => {\n                    const nameValue = current.split(\"=\");\n                    return config[nameValue[0]] = decodeURIComponent(nameValue[1]);\n                }, \"\");\n\n                \/\/ if not valid, show error message\n                if (!config.recipient || !config.amount) {\n                    showMsg('Page not initialized correctly. Please go back and try again.');\n                    buttonEl.prop('disabled', true);\n                } else { \/\/ if valid, enable button and launch Embed2.0\n                    buttonEl.prop('disabled', false);\n                    if (typeof checkout.update !== 'function') {\n                        checkout = window.flywire.Checkout.render(config, \"#checkout-button\");\n                    } else {\n                        checkout.update(config);\n                    }\n                    buttonEl.click();\n                }\n\n                function showMsg(msg, type = 'error') {\n                    const msgEl = $('#flywire-msg');\n                    msgEl.attr('class', `woocommerce-${type}`);\n                    msgEl.slideDown()\n                }\n            });\n        <\/script>\n\t\t\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-106020","page","type-page","status-publish","hentry"],"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/formaciononline.ucavila.es\/en\/wp-json\/wp\/v2\/pages\/106020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/formaciononline.ucavila.es\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/formaciononline.ucavila.es\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/formaciononline.ucavila.es\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/formaciononline.ucavila.es\/en\/wp-json\/wp\/v2\/comments?post=106020"}],"version-history":[{"count":0,"href":"https:\/\/formaciononline.ucavila.es\/en\/wp-json\/wp\/v2\/pages\/106020\/revisions"}],"wp:attachment":[{"href":"https:\/\/formaciononline.ucavila.es\/en\/wp-json\/wp\/v2\/media?parent=106020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}