• Hello team,

    Great plugin!!!! The best!!!!

    I embedded the payment form url directly on page with a simple iframe (Instead of using the shortcode), check screenshot:
    https://snipboard.io/vKwnoh.jpg

    This is the link to the direct form (embedded above):
    https://mydomain.com/asp-payment-box/?product_id=4095
    NOTE: mydomain.com is a dummy domain, please let me know if you need the my real domain.

    It displays correctly, check screenshot:
    https://snipboard.io/PfODzJ.jpg

    It process correctly transactions, approves, declines, the money goes to the account, etc.
    The only problem is that it is not redirecting to the transaction result (thank you page)

    It stays here spinning:
    https://snipboard.io/5ZUJky.jpg

    How can I make it so it goes to the the transaction result page:
    https://snipboard.io/npFrWo.jpg

    Any solution, jquery code or any other piece of code I missing or I could use?

    I need to have the form on the page instead of a button to open the form in a popup.

    This is the only bit that is left for my solution: the final redirection.


    PLEASE HELP!!!

    Thank you!

    • This topic was modified 4 weeks, 1 day ago by karlosuccess.
    • This topic was modified 4 weeks, 1 day ago by karlosuccess.
    • This topic was modified 4 weeks, 1 day ago by karlosuccess.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us. This issue might be related to the iFrame. What if you don’t use the iFrame, does it work? The following documentation can help.

    https://s-plugins.com/using-a-text-link-instead-of-the-buy-now-button-shortcode/

    Let me know how you go.

    Regards

    Thread Starter karlosuccess

    (@karlosuccess)

    I confirm this link is working properly when opened directly on the browser, no issues, it redirects the user to the thank you page:
    https://mydomain.com/asp-payment-box/?product_id=4095

    However, I dont need a button, I need to have the form on the page, this is what I have so far:
    https://snipboard.io/UPQ9aM.jpg

    It is working great, the only issue is that it is not redirecting to the thank you page.
    The form stays spinning and does not redirect, check:
    https://snipboard.io/5ZUJky.jpg

    Any thought please?

    Thread Starter karlosuccess

    (@karlosuccess)

    I am doing a simple iframe like this with wp bakery:
    https://snipboard.io/vKwnoh.jpg

    Is there a way to add some content above the form at:
    https://mydomain.com/asp-payment-box/?product_id=4095

    Please help

    Plugin Support mbrsolution

    (@mbrsolution)

    Is there a way to add some content above the form at:

    I have submitted a message to the developers to investigate further your request.

    Kind regards.

    Thread Starter karlosuccess

    (@karlosuccess)

    Hello team,

    I have run another test with ALL PLUGINS DEACTIVATED except the ASP plugin, and the payment box inside the iframe does not redirect,

    1. All plugins deactivated
      https://snipboard.io/OIVdUR.jpg
    2. Form submission works properly
      https://snipboard.io/KW1H0E.jpg
    3. It just does not redirect, stays spinning:
      https://snipboard.io/dGfr38.jpg

    If the link is visited directly, it works and redirects as expected:
    https://mydomain.com/asp-payment-box/?product_id=4095
    https://snipboard.io/NqhtPo.jpg

    Instead of iframing the payment box to have it “on page”, I could just add custom content to the content box directly (https://mydomain.com/asp-payment-box/?product_id=4095), if you tell me how, that would solve the task, I could live with it.

    Although I feel the iframe should work, I or it might just be missing something.

    Thank you team

    • This reply was modified 4 weeks, 1 day ago by karlosuccess.
    Plugin Contributor Ruhul

    (@tips-and-tricks-hq)

    Hi, That redirect is being executed inside the iframe, so either:

    1. The redirect happens but only inside the iframe (the thank you page would load in the small iframe window, not the parent), or
    2. The browser blocks the top-level navigation from cross-/same-origin iframe scripts and the spinner just hangs.

    This is browser/iframe behavior, not a plugin specific issue. Our plugin is not designed to be used with iframes so this is not a supported model 🙁

    The proper way to use our pluign is to skip the iframe entirely and embed the product via the shortcode or the following text link option:

    https://s-plugins.com/using-a-text-link-instead-of-the-buy-now-button-shortcode/

    If you wanted to do your own customization with iframe approach (e.g. cross-domain), you could try to have the parent page listen for a postMessage from the iframe and do window.top.location.href = ...

    Thread Starter karlosuccess

    (@karlosuccess)

    I added this to the parent (where the iframe is) but it is not doing it, any light you can give me please? I feel we are really close please I will love you forever

    // Listen for messages from the iframe
    window.addEventListener("message", function(event) {
    // SECURITY: Verify the origin of the message
    //if (event.origin !== "https://mydomain.com/asp-payment-box/?product_id=4095")
    //return;

    // Check if the message indicates a success/redirect
    if (event.data && event.data.action === 'redirect') {
    alert(event.data)
    // Redirect the parent page to the new URL
    window.top.location.href = event.data.url;
    }
    }, false);
    Plugin Contributor Ruhul

    (@tips-and-tricks-hq)

    I’d genuinely like to help here, but unfortunately what you’re trying to do isn’t something we can work around. The reason the form keeps spinning is that the success redirect is being blocked by the browser, when a page is embedded inside an iframe, browsers restrict the embedded page from navigating the parent window for security reasons. That’s why opening the URL directly works fine but iframing it doesn’t.

    So I don’t have a solution for this particular setup, sorry about that.

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.