Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Marcus Guedes 2 posts 22 karma points
    19 days ago
    Marcus Guedes

    Invalid HTML after /umbraco/commerce/storefront/api/v1/checkout/{orderId}/token


    Using Umbraco 13.1, trying to do a headless checkout workflow with Hosted option (just redirect to payment), following the documentation, everything goes fine until the call /umbraco/commerce/storefront/api/v1/checkout/{orderId}/token, and redirect to the payUrl, the payURL is something like:

    Redirecting to the URL gives a broken HTML and it doesn't work. I already tried the same thing using the, it also has the same problem using the redirect option on UMBRACOCOMMERCECHECKOUT_MODE.

    the HTML returned:

    <!DOCTYPE html>
        <meta charset="utf-8">
        <title>Umbraco Commerce - Redirecting...</title>
                    var stripe = Stripe('pk_test_xxxxxxxxxxxx');
                    window.handleStripeCheckout = function (e) {
                        sessionId: 'cs_test_xxxxxxxxxx'
            }).then(function (result) {
                        // If `redirectToCheckout` fails due to a browser or network
                        // error, display the localized error message to your customer
                        // using `result.error.message`.
                    return false;
                    <script></head><body><form action="" method="post" id="form6235abd338fe4bbca11d98466d5ecb3a"></form><script>window.onload = function(event) { var frm = document.getElementById("form6235abd338fe4bbca11d98466d5ecb3a"); if (frm.hasAttribute("onsubmit")) {frm.dispatchEvent(new Event("submit", { cancelable: true })); } else {frm.submit(); } }</script>

    using the devtools console, with that broken page, and create the stripe object and do stripe.redirectToCheckout(), it redirect correct to stripe and I can make the payment..

    can anyone help me?

  • Alex 3 posts 73 karma points
    19 days ago

    the closing tag for the Stripe script is missing, which is causing the rest of the script not to run properly.


  • Marcus Guedes 2 posts 22 karma points
    1 week ago
    Marcus Guedes

    there is a bug in Umbraco, it will be fixed in the next build.

Please Sign in or register to post replies

Write your reply to: