• Resolved Wilco

    (@wilcodeveloper)


    Hi,

    When calling the shortcode with ajax it gives the following error: The amount is lower than the minimum.

    My guess is that the shortcode needs public.js to be runned again in order to give the new price to the shortcode, but i’m not sure.

    My question: What do I need to do to make it work with ajax?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor davdebcom

    (@davdebcom)

    Hi Wilco

    Thanks for reaching out!

    Yes, public.js is required! Paytium automatically adds that file for posts and pages, if it can’t see that Paytium is loaded in one of those it will not include it. You could off course add that file to your script yourself, that should work.

    I’m not sure I understand what you are doing, feel free to explain more if I misunderstood!

    Kind regards
    David

    Thread Starter Wilco

    (@wilcodeveloper)

    I will try to re-enqueueu it on ajax.

    Let me explain what i’m trying to achieve here:
    I have a coupon/discount form on the same page as the paytium button.
    This coupon gets checked with ajax > php and if its correct I update a custom field with the new price. If its correct I also want to make an ajax call to refresh the paytium button to give the new price.

    Everything works fine and the price gets updated. Except when I refresh the paytium button.

    Plugin Contributor davdebcom

    (@davdebcom)

    Yes, please try adding it, I think that might be the issue/solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Load shortcode with Ajax’ is closed to new replies.