KyberWidget WooCommerce plugin allows developers to easily add a cryptocurrency payment gateway to Wordpress sites.
- PHP version 5.6+
- WordPress 3.8+
- WooCommerce 3.0+
- Clone code repo to your
cd <PATH>/wp-content/plugins/ git clone https://github.com/KyberNetwork/widget-woocommerce
- Install required components
- Activate the plugin
From ZIP file
Download the plugin zip file from here
Unzip to your WordPress folder
Activate plugin in
After activation, you will find plugin settings in your WordPress Dashboard under WooCommerce->Payment. Enabling the plugin will add an option to pay by tokens on your checkout page.
The configuration in this plugin are based on the widget configuration from the Widget Generator and modified to fit the WooCommerce model. Plugin settings include:
|The title to be displayed for the KyberWidget WooCommerce payment option for users in the checkout pages.||Kyber Payment Gateway|
|Describe what payment gateway is for, and will be displayed under the payment options.||Pay with tokens|
|Wallet address where you want to receive the payment. This address is required. Without this address payment will not be processed||0xf6d420FAB01826386e39664770299eADD68617da|
|Token symbol of the token you want to receive from payments. The token must be supported by Kyber Network.||KNC|
|ETH network that the payment gateway will run in. Options are: ||Ropsten|
|Behavior of how the widget will appear to the user. Either ||popup|
|Node endpoint to check tx status. If you do not have one, create one using Infura||https://ropsten.infura.io/v3/fb1b33|
|Number of block confirmations to finalize tx||40|
|Registered ETH address that is part of the fee sharing program||0x2B522cABE9950D1153c26C1b399B293CaA99FcF9|
These parameters are defined in the widget as payment gateway settings in Woocommerce and also defined in the source file
The main logic of handling payments through the widget is defined in the source file
This plugin allows an e-commerce website using WooCommerce to accept payments with any token. Below is a sample walkthrough to use this plugin after installation and activation.
- Configure plugin settings.
- Set item prices in fiat.
- Item prices will be displayed in fiat.
- When checking out, pay your shopping cart using any token by selecting the Kyber Payment Gateway option.
- When the user pays for his shopping cart using the Kyber Payment Gateway, the KyberWidget will handle the rest. With the KyberWidget, user can pay using any tokens (supported by Kyber) and you (the vendor) will receive the token of your choice.
- The widget will return the transaction hash for the payment. The plugin will use this transaction hash for checking the transaction status.
- 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.
- When the transaction fails, the order status will change from
Order created ->
Pending payment ->
On-Hold (payment broadcasted & mornitored) ->
Processing (successful payment) OR
Failed (failed payment)
If you are a developer and want to contribute, please check out the following guidelines for contributing to the Woocommerce Kyber Widget repository.