Woocommerce Plugin Documentation
If you want to show the payment options from our end, you need to follow this documentation. This will redirect you to the payment gateway options.
Get the plugin from this link. Woocommerce Plugin
Prerequisites
- Wordpress 5.1*
- WooCommerce 3.6*
- curl php extension
- Account credential of wincommerz
Follow the process given below:
Step: 1
Download zip file or clone the repository.
Step: 2
Go to Plugins > Add New.
Step: 3
Click on "Upload Plugin" button.
Step: 4
Go to "Choose File" and upload the Zip file of plugin.
Step: 5
Active the plugin.
Step: 6
Got to WooCommerce > Settings and Click on the tab named "Payments".
Step: 7
Enable the "Wincommerz Payment Gateway".
Step: 8
Click on "Manage" to set up Title, Description, Instructions, Username.(The username will be provided by Wincommerz.)
Step: 9
Click on "Save changes" to update the settings.
Step: 10
Make a custom page from Pages > Add New
Step: 11
Make the name of the page "Thank You". So the slug will be "thank-you".
Step: 12
Go to your project folder > wp-content > themes > your-theme > page.php
Step: 13
Add this code just before the get_footer()
global $pagename; if (isset($_GET['txID']) && $pagename == 'thank-you') { $param = $_GET['txID']; $ex = explode("-",$param); $order = wc_get_order($ex[1]); $order->reduce_order_stock(); $order->update_status('completed',__('Payment Completed.','win_pay_woo')); WC()->cart->empty_cart(); }
That's it! After the payment process it will redirect to the thank-you page.