Build a cryptocurrency store in 10 minutes


This article was originally published in :Inkerk Inc.


This article will teach you how to build an online B2C store which supports ERC20 certification in 10 minutes using WordPress

Nowadays, blockchain and certification economy is very popular. Many open source communities are considering how to combine blockchain technology and certification economy. We, Linux China is one of these kinds of open source communities. The good news is, we have already made the first move, release community certification and it has been circulated, too. We are very to share our experience with other communities, in order to let more communities are able to explore new ecology and avoid some traps we met. We hope through this sharing, we can make a better open source world.

Our certification store is base on WooCommerce which is using WordPress.

Installing WordPress

Before starting to configure store, you need to install WordPress first. In order to support WordPress, you should buy a VPS which support PHP and MySQL or configure the environment by yourself.

After successfully install WordPress, you can see a page like this.

Installing WooCommerce

After the installation of WordPress, you can start to install a plugin called WooCommerce. Click on the button in menu bar named plugin – install plugin. Search WooCommerce in searching page and you can see WooCommerce.

Click on install now to install WooCommerce. After the installation, click active to enable the plugin.

WooCommerce will start a guide of initialization, follow this guide to configure it.

You can enable the off-line payment if it is necessary. But we don’t need it in terms of cryptocurrency.

And set the postal fee.

Cancel the installation of MailChimp when installing WooCommerce, enable StoreFront only:

It depends on your personal requirement whether to install JetPack:

When you see this image, it shows that you finish the initialization configuration.

Click on the view control panel to back to WordPress interface.

Add ERC20 as the payment currency

In order to avoid currency exchange, we need to add ERC20 certification as a custom currency.

Open plugin – install plugin and search Woocommerce Customize ERC20 Currency. This plugin is developed by inkerk blockchain company and it is already open its source code on GitHub.

Find Woocommerce Customize ERC20 Currency and install it.

Install and enable it.

After enabling this plugin, click on setting – customize Woocommerce ERC20 Currency in the left menu bar and get in the setting page.

In the setting page, you can add name and symbol of your currency. For example, I set mine as LCCN and Ⓛ. Then save changes.

After saving the change, click on WooCommerce – setting in the left menu bar and get in WooCommerce setting page. In the general page, you can see the currency type. Set your own currency, click on setting and save it.

Now, the goods on this website can be paid by ERC20 Currency.

Install ERC20 token payment gateway

Now, we can start to install Woocommerce ERC20 Payment Gateway to enable the payment support on this online store. Woocommerce ERC20 Payment Gateway is also a plugin developed by inkerk blockchain company and it is already opened source on GitHub.

Click on the button in left menu bar named plugin – install plugin. Search Woocommerce ERC20 Payment Gateway in searching page. Then, you can see install and enable it. Click on setting go into the setting page.

In setting page, enable use ERC 20 Token to pay and then save changes.

Click on setting after the payment way, get into the setting page of the plugin. Firstly, we can set some basic information about payment.

Title is the title of payment way, it will show on the payment page. Therefore, you can set it as use LCCN to pay or something similar. What is more, you can also write some introduction like how to install and use Metamask, switch to main chain(?) to ensure to payment can successfully be done.

The icon of payment way will display just follow the title of payment way. You can set it as the icon of your certification to remind the customers.

You can start to set the content about ERC20 certification now.

Wallet address is the wallet that customers send the certification to, set it as your own wallet address.

Contract ABI can be found in etherscan. For example, the contract address of LCCN is https://etherscan.io/address/0x8f4f3b3c3a900d10e9cf74c30e16f5958d8fd339#code. LCCN publishes its source code of contract so ABI can be found in contract page(if your ERC20 is not published its contract yet, please request it from the relevant person). Fill it in the setting page.

Address of ABI contract is the address of ABI in specific web chain(?). If you are in the testing environment, the address will be different from the production environment.

Gas remind will remind customers to use relatively higher gas to accelerate to speed. You can customize this sentence or keep it as default.

At this point, the plugin has been set up.

Testing payment.

After setting, we can create a product to test the setting. Click on create – product on the top and get into the relevant page.

Fill in name, description, and price in product page:

And then you can publish and create a new product. Click on view product navigate to the main page of the product.

Add it into the cart:

Click on proceed to checkout to settle the product.

Fill in the billing address(it will be displayed in shipping address in the page), click on use Token payment.

Drag to the bottom you can the button pay. Click it and the Metamask installed in the browser will evoke automatically.

Confirm payment:

After payment, the page will refresh automatically. You will see the notice like payment success.

Processing order

How to confirm the order is successfully paid after user pay the bill? Get into “-WooCommerce-order”, you can see the order from all users.

Orders under processing block are the order that users already paid but not be dealt. Click on it then you can get into the order detail. Tx value of this order is in order remark at the right hand. You can check if the deal is done by click on the certain link.

Until now, all the process of using ERC20 token is done. You can start to create products and use the ERC20 token to finish your online ERC20 deal.

About inkerk blockchain

Inkerk blockchain is a provider of technology services in the area of the blockchain. We provide comprehensive service of ERC20 certificate issuance, security audit, solution construction, distribution process design, airdrop solution, and other consulting and payment services to customers.


Links
  • Woocommerce ERC20 Payment Gateway Plugin

At WordPress.org:https://wordpress.org/plugins/woo-erc20-payment-gateway

At Github : https://github.com/inKerk/woocommerce-erc20-payment-gateway

  • Woocommerce Customize ERC20 Currency Plugin

At WordPress.org : https://wordpress.org/plugins/woo-custom-erc20/

At Github : https://github.com/inKerk/woocommerce-custom-erc20-currencies

Leave a Reply

Your email address will not be published. Required fields are marked *

Top