This guide will walk you through on how you can interact with our protocol implementation using our WooCommerce plugin. The most common group of user that can benefit from this guide are vendors that use WordPress for their e-commerce websites.
- PHP version 7.2+
- WordPress 3.8+
- WooCommerce 3.0+
Installing the plugin
Option A: Clone Github Repo Source
- Clone the code repo to your
cd <PATH>/wp-content/plugins/ git clone https://github.com/KyberNetwork/widget-woocommerce
- Install the required components
Option B: ZIP file
Download the plugin zip file here
Unzip to your WordPress folder
Activating the plugin
Activate the plugin in
/wp-admin/plugins.php. After activation, you will find the plugin settings in your WordPress Dashboard under the WooCommerce->Payment section. Enabling the plugin will add an option to pay with tokens on the checkout page.
Configure the plugin
For this guide, we use the following settings shown below. You may configure them as you wish.
|Kyber payment gateway|
|Pay with your coins, tokens supported by Kyber|
When the user pays for his shopping cart using the Kyber Payment Gateway option, the KyberWidget will handle the rest of the process. The user will be able to pay using any tokens supported by Kyber, while you (the vendor) will receive the payment in the token of your choice.
The widget returns the transaction hash for the payment, which is used by the plugin for checking the transaction status.
Check status of transaction
When the transaction succeeds, the order status will change from
Processing. At this stage, the website admin or vendor will receive a notification about the successful payment of the cart, and will start processing the shipment of the products.
Should the transaction fail, the order status changes from
Order status and flow
The order status flow is summarised below.
Order created ->
Pending payment ->
On-Hold (payment broadcasted & mornitored) ->
Processing (successful payment) OR
Failed (failed payment)
Visit the WooCommerce Plugin API Page for more information.