How to add the Place Order button functionality on my Buy Now button
-
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.
- The topic ‘How to add the Place Order button functionality on my Buy Now button’ is closed to new replies.