cryptom2/metamask-eth-payment
Composer 安装命令:
composer require cryptom2/metamask-eth-payment
包简介
Metamask & web3js Ethereum payment method Magento 2 module without any third party gateways
README 文档
README
Metamask Ethereum payment method module for Magento 2
Table of contents
Description
Extension allows to receive direct payments from customer Ethereum blockchain wallet to merchant Ethereum wallet using Metamask in Ethereum cryptocurrency Ethers.
Idea
Using any gateways and third party services to make and receive payments breaks the philosophy of cryptocurrencies. If you use cryptocurrencies to pay you should be able to make it directly between wallets that no one can control, interrupt and change your transaction. But when this module was created there are only modules for Magento 2 from companies that are gateways between customer and merchant and handle the payment process, can control this process and payment processes in this case have no any differences from using bank account.
The main idea of this module is to allow you make and receive payments directly between wallets, without using any third party gateways and commission and pay only networks gas.
Features
- Display prices in Ether currency
- Pay by Ether from checkout after placing order
- Pay from customer accound order view page (customer can pay on checkout or, if have any troubles, later from his account)
- Check transaction status using
web3jslibrary - Check transaction status through
etherscan.ioAPI request - Check transactions by cron using
etherscan.ioAPI request - Check transaction manually from admin area transaction page
Installation
To install module you need to add repositories to your composer.json:
Composer installation
"repositories": {
"crypto-base": {
"type": "git",
"url": "git@github.com:torys877/crypto-base.git"
},
"crypto-currency-precision": {
"type": "git",
"url": "git@github.com:torys877/crypto-currency-precision.git"
},
"crypto-metamask-eth-payment": {
"type": "git",
"url": "git@github.com:torys877/crypto-metamask-eth-payment.git"
}
}
Or add repositories from console:
composer config repositories.crypto-base git git@github.com:torys877/crypto-base.git
composer config repositories.crypto-currency-precision git git@github.com:torys877/crypto-currency-precision.git
composer config repositories.crypto-metamask-eth-payment git git@github.com:torys877/crypto-metamask-eth-payment.git
Install module:
composer require cryptom2/metamask-eth-payment:v1.0.0
And run
php bin/magento setup:upgrade
Settings
Live Settings
- Enabled - enable/disable payment method
- Title - payment method title
- Ether Network Version - version of network (can be checked in metamask settings, by default Ethereus is
1, but testing networks have another version) - Merchant Ether Address - merchant ethereum address to take payment
- Etherscan Url - url to view transactions (can be different in different networks, useful during testing)
- Check transaction on Etherscan - if set not cron does not work and transactions are checking only on frontend on payment page using web3js
- Etherscan Api Url - display if
Check transaction on Etherscanis enabled. Api url for needed network to check transaction (can be different for different networks) - Etherscan Api Key - display if
Check transaction on Etherscanis enabled. Api key for etherscan - can be taken on etherscan.io/apis
Test Mode
Settings are the same as for Live, but you need to use test networks (test network version, test network etherscan api url/key etc. On screen uses Ropsten network)
Display Eth Currency
To display ETH currency you also need to add it to allowed currencies and add currency rate in magento (automatically update rates will maybe included in future releases)
Screenshots
Display Prices
Payment Method On Checkout
Note: Payment method is displaying only if ETH currency selected
Connect Wallet
Note: If wallet is not connected firstly customer sees 'Connect Wallet' button, then 'Pay' button
Pay by ETH
Processing Transaction
Note: After confirming transaction in Metamask wallet, customer should wait on the same page to magento confirm transaction
Magento sends request to metamask using Web3js and try to get confirmation message, after it, Magento
sends request to server and if Etherscan checking is enabled, transaction status also is checking on etherscan.
IMPORTANT: it is highly recommended to enable etherscan checking to prevent JS injection on processing page
Check transaction in admin area
Transaction ID is clickable and move you on etherscan page for this transaction
Pay From Customer Account
If customer placed order but not paid it, he still can do it from his account. This button sends him to processing page and allows to do payment
Transaction Captured
When transaction is captured and approved in blockchain and magento, customer sees this message
Author
Ihor Oleksiienko
License
Metamask Ethereum extension for Magento 2 is licensed under the MIT License - see the LICENSE file for details
cryptom2/metamask-eth-payment 适用场景与选型建议
cryptom2/metamask-eth-payment 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28 次下载、GitHub Stars 达 22, 最近一次更新时间为 2022 年 06 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 cryptom2/metamask-eth-payment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cryptom2/metamask-eth-payment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-21








