Magento 2 Installation
Step-by-step guide to install LayerPay on Magento 2
Requirements
- Magento 2.4.0 or higher
- PHP 8.1 or higher
- Composer
- SSL certificate (HTTPS required)
- Command line (SSH) access
Installation
Method 1: Manual Installation (Recommended)
- Download layerpay-magento.zip
- Extract the ZIP file
- Copy
LayerPayfolder toapp/code/ - Run Magento setup commands (see below)
# Upload module to app/code/
unzip layerpay-magento.zip
cp -r LayerPay /var/www/html/app/code/
# Enable the module
php bin/magento module:enable LayerPay_CryptoPay
# Run setup upgrade
php bin/magento setup:upgrade
# Compile DI
php bin/magento setup:di:compile
# Deploy static content (production mode)
php bin/magento setup:static-content:deploy -f
# Clear cache
php bin/magento cache:clean
php bin/magento cache:flush
Directory Structure
app/code/
└── LayerPay/
└── CryptoPay/
├── registration.php
├── etc/
│ ├── module.xml
│ ├── config.xml
│ ├── di.xml
│ └── adminhtml/system.xml
├── Model/
├── Controller/
├── Block/
├── Gateway/
└── view/
Configuration
Configure the module in Magento Admin:
- Go to Stores → Configuration
- Expand Sales → Payment Methods
- Find "LayerPay - Crypto Payments"
- Configure the settings
Configuration Options
| Setting | Path | Description |
|---|---|---|
| Enabled | payment/layerpay_cryptopay/active |
Enable/disable payment method |
| Title | payment/layerpay_cryptopay/title |
Payment method name at checkout |
| Merchant Address | payment/layerpay_cryptopay/merchant_address |
Your Ethereum wallet (0x...) |
| Network Mode | payment/layerpay_cryptopay/network_mode |
test or live |
| Price Margin | payment/layerpay_cryptopay/price_margin |
Volatility buffer (0-10%) |
| Debug | payment/layerpay_cryptopay/debug |
Enable logging |
CLI Configuration (Optional)
# Enable the payment method
php bin/magento config:set payment/layerpay_cryptopay/active 1
# Set merchant address
php bin/magento config:set payment/layerpay_cryptopay/merchant_address 0x742d35Cc...
# Set to live mode
php bin/magento config:set payment/layerpay_cryptopay/network_mode live
# Clear config cache
php bin/magento cache:clean config
Testing
- Set Network Mode to "test"
- Get testnet ETH from a faucet
- Place a test order
- Select LayerPay at checkout
- Connect wallet and pay
- Verify order status in Admin → Sales → Orders
💡
Enable Debug mode to see detailed logs in
var/log/
Going Live
# Switch to live mode
php bin/magento config:set payment/layerpay_cryptopay/network_mode live
# Disable debug
php bin/magento config:set payment/layerpay_cryptopay/debug 0
# Clear cache
php bin/magento cache:flush
✅
LayerPay is now live on your Magento store!
Troubleshooting
Module not showing in payment methods
# Check if module is enabled
php bin/magento module:status LayerPay_CryptoPay
# Re-run setup if needed
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
JavaScript not loading at checkout
# Redeploy static content
php bin/magento setup:static-content:deploy -f
# Clear full page cache
php bin/magento cache:clean full_page
Check Logs
# View LayerPay logs
tail -f var/log/layerpay.log
# View system logs
tail -f var/log/system.log
📧
Need help? Contact us at contact@l2pay.app