Опис
The plugin makes it easy to integrate Unicrow into a marketplace built on WooCommerce and optionally Dokan.
It extends WooCommerce and Dokan settings to allow admins to configure its parameters
Overview
There are a few things important to understand before we get into the (very simple) setup.
About _Unicrow_
To better grasp the potential that Unicrow brings to marketplace operators, it is good to understand the protocol basics.
* Unicrow runs on Ethereum’s Layer 2s Arbitrum One and Base and supports ETH and any ERC20 token, e.g. stablecoins like USDT or USDC
* Each individual escrow has the following parameters: seller (supposed to receive the funds), marketplace (optional, gets a commission), arbitrator (optional, decides a dispute), and what’s the challenge (escrow) period.
* The Buyer can release funds to the seller at any time
* Funds can be claimed to the seller after the challenge period ends
* The Marketplace and/or arbitrator fees will be sent out when the funds are claimed or released from the escrow.
* Unicrow is immutable and non-custodial
You can read more details at docs.unicrow.io.
The Quick Start section of our documentation website includes useful information for users. Feel free to copy&paste any of the content or refer to it in your marketplace user guides.
Supported tokens
The plugin supports ETH, USDC, and USDT on Arbitrum One network. We will extend the support for Base soon and for additional tokens based on feedback and eventually make it easier for admins to add support for any tokens. In the meantime, the admins can extend support in the source code directly (see Advanced Setup below)
Supported functionality
WooCommerce
Unicrow plugin extends Wooommerce (WC) in the following ways:
* It is added to a list of payment methods in WC’s settings and on the checkout page
* It adds an optional seller address attribute to product settings - this technically allows operating a multi-vendor marketplace even without Dokan, simply by adding different seller address to different products.
* It adds a link to the transaction in Unicrow web3 app to admin emails and to the order notes.
Dokan
The plugin further adds or reuses the following to Dokan settings:
* It uses Dokan‘s admin commission as a marketplace fee parameter in Unicrow transactions
* It adds seller address parameter to vendor settings and if set, uses it in the transactions (in that case, setting seller address in product settings or WooCommerce Payment settings is not necessary)
* It adds to an email sent to the vendor a note with a link to the transaction in Unicrow web3 app
Prerequisites
WordPress plugins:
- WooCommerce is a required and technically sufficient pre-requisite since Unicrow plugin hooks into its functions for setting up and for payment processing.
While WooCommerce itself doesn’t support multi-vendor setup, Unicrow extends product settings for seller address attribute.
That means if an admin doesn’t want to complicate things with multiple sellers and an additional plugin such as Dokan, but wants to be able to process payments to different addresses for different products, the combination of WC and Unicrow allows for this. - (Optional) Dokan for full multi-vendor functionality.
Other/Crypto-related prerequisites for different actors:
- Marketplace operator
- A secure wallet able to receive fees (if applicable) on the supported network
- An online web3 wallet to provide arbitration service loaded with a little bit bit of ETH to pay for gas costs
- (optional) An online web3 wallet that would regularly claim payments to _sellers as a service to them (for simplification it can be done also from the Arbitrator wallet)
- Buyer
- A web3 wallet with sufficient balance to pay the purchase and a little bit of ETH on the supported network
- Seller
- An Ethereum address to receive the supported tokens on the supported network
Setting Up
Follow these steps to set up Unicrow with WooCommerce and, optionally, Dokan
1. Open WordPress Admin Console
1. Install and activate WooCommerce, Unicrow WooCommerce plugin, and optionally Dokan
2. Open WooCommerce Settings Payments and press Manage next to Unicrow
3. Enter the values per your preference:
* Default Seller Address: If you plan to receive all payments to one address, paste that address here. Leave it empty if you plan to set seller address per product or (in Dokan) per vendor
* Marketplace Address: If you plan to collect a commission directly from Unicrow to your wallet, paste its address here. This can be a cold wallet or even an exchange address as long as it supports receiving the tokens you chose on the supported network (currently Arbitrum One TODO: add link to arbitrum guide).
* Marketplace Commission: Leave empty if you want the plugin to reuse Dokan commission settings or if you don’t plan to charge a commission.
* Challenge Period: How long a buyer can challenge the payment. After this, the seller can claim the payment.
* Arbitrator address: An address of a wallet account from which you will resolve disputes. The address should be funded with a little bit of ETH for gas fees and easy to access and make transactions from, e.g. a browser or even a mobile wallet. It won’t hold customer funds at any point so it can be „hot“.
* Arbitrator fee: Arbitrator fee in %. If the marketplace operator is an arbitrator too, can leave this at 0.
* Accepted tokens: Currently supporting ETH, USDT, USDC. We’d like your feedback which ones we should prioritize and will eventually let you manage a custom list (which you of course can still do by opening the plugin code and editing config.php 🙂
4. If you use Dokan, you can set seller address per vendor in Users -> All Users -> Edit -> Unicrow Vendor Options
Advanced Setup
Please don’t hesitate to contact us at [email protected] to suggest improvements, but in the meantime if you want to add some other ERC20 token to the list or switch the plugin to support Base, you can do it by editing the plugin code using a plugin like WPIDE:
* To add a custom ERC20 token, edit config.php
* In this case, we’d recommend to edit the description to reflect this too
* To switch to Base, edit src/class-wc-gateway-unicrow.php and change 'chainId' => 42161,
to 8453
External services
The plugin reads ETH price from Coingecko’s public API (api.coingecko.com).
It also connects to Unicrow’s REST API to create a payment request in Unicrow’s app. Subsequently it redirects a user to the app to pay the re request and uses the provided callback url to send the user back to the confirmation page.
The data submitted to the REST API are:
* order price
* order number
* buyer, seller, marketplace, and arbitrator ETH addresses
* marketplace and arbitrator commissions
* escrow period
Снимци екрана
Unicrow checkout box with token selection Checkout box when only one token is set by the admin Payment request summary Wallet popped up asking for payment confirmation Payment confirmed in Unicrow app Email confirmation with escrow information Arbitrator’s payment summary screen Arbitration form Payment ready to be claimed Seller’s view of the payment with a refund button
ЧПП
-
What cryptocurrencies and networks are supported?
-
ETH, USDC, and USDT on Arbitrum One.
-
Will you add more tokens and networks
-
Yes, we’ll add support for Base (which is already supported by Unicrow) and more tokens based on feedback
-
Can I add support for a specific token myself?
-
Yes, edit the config.php file and add your preferred token information
-
Is Dokan required?
-
No, WooCommerce is sufficient, but Dokan adds additional multi-vendor functionality.
Прегледи
Нема рецензија за овај додатак.
Сарадници и градитељи
Unicrow: Cryptocurrency escrow је софтвер отвореног кода. Следећи људи су допринели овом додатку.
СараднициПреведите Unicrow: Cryptocurrency escrow на свој језик.
Заинтересовани сте за градњу?
Прегледајте код, проверите SVN складиште или се пријавите на белешку градње преко RSS-а.
Белешка о изменама
1.0.0
- Initial release