• Resolved bonini81

    (@bonini81)


    Hi guys, i am building a custom woocommerce payment gateway plugin, since the gateway i am building the plugin for loads a PopUp when its onclicked at the Checkout Page, which is where the credit cart payment occurs (on a POP Up from the gateway). I need to add on my Pay Now button, that button looks like this so far:

    <form name=”PayBox” id=”PayBox”>
    <input type=”hidden” name=”remail” value=”gateway account email”>
    <input type=”hidden” name=”sendmail” value=”buyer email”>
    <input type=”hidden” name=”amount” value=”$10″>
    <button onclick=”submitPayBox()” id=”pay”></button>
    </form>

    need to add, the functionality of the Place Order default button at checkout page, that validates the checkout form data submitted by user (like First Name, Billing Address, etc…) and grabs basic values submitted, like the total amount of the order and billing email (which is easy to grab with woocommerce API), but the question is how do I add to my Buy Now button, the functionality to validate the forms fields and grab the information from the checkout form in order to load that data to my Payment Gateway PopUp. Well what i all do is when the user, clicks on my gateway it will hide the default Place Order button and replace it with my Buy Now button, so thats where i all need to have the same functionality of the Place Order button on mine.

    So i all appreciate the help, thanx a lot.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @bonini81,

    Replicating this from scratch would be beyond my knowledge, but one thing I could suggest is looking at the checkout templates that already exist in WooCommerce or one of our free payment methods like PayPal Express that uses a pop-up or Stripe when you enable Stripe Checkout (another modal/pop-up).

    There are surely examples there you could glean some insight from on how our developers have done something very similar.

    Also, hopefully, some of my much brighter colleagues or other open source friends can add a better answer here. ??

    Kenin

    (@kbassart)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thread Starter bonini81

    (@bonini81)

    Hi guys sorry for delay, well i kind of stopped researching on this issue, cause busy on other tasks. Well thanx @ryanr14 thanx for the reply, sure i all take look on those examples you mentioned. Hopefully anyone else can reply. @kenin And this post be open again? If not i all open a new one later on, as i am back on solving this puzzle of the checkout button.
    Thanx

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add the Place Order button functionality on my Buy Now button’ is closed to new replies.