I need to integrate the code of payment gateway in woocommerce. I have installed the Custom payment gateway plugin. But I didn’t finf the option for integration of the code.
I tried to add code on the thankyou.php. Here,
1. I am checking the payment method selected.
2. If my custom payment is selected it redirects to payment-gateway.php file, it contains my PG code.
But when I am redirected to thankyou.php the order entry is made in database and email is send to admin before payment made.
How can I avoid this? Or is there any other way to integrate my PG code.