|
1 | | -## Installation |
2 | | - |
3 | | -### Install using Shopware 6 Extensions |
4 | | - |
5 | | -1. Navigate to the Shopware Administration -> Extensions -> My Extensions |
6 | | -2. Click on "Upload Extension" |
7 | | -3. Upload provided .zip file |
8 | | -4. Click Install next to the Mondu Payment extension |
9 | | -5. Click on Activate button to activate the extension |
10 | | -6. Click on three dots next to the Mondu Payment extension and select Configure |
11 | | - 1. Select Sandbox mode |
12 | | - 2. Enter API key and Webhooks Secret |
13 | | - 3. Save |
14 | | -7. Navigate to the Settings -> Payment and click on Edit Mondu Payment |
15 | | - 1. Select Active field to activate the payment |
16 | | - 2. Save |
17 | | -8. Navigate to the Storefront sales channel (or any default) |
18 | | - 1. Add Mondu payment as a Payment method |
19 | | - 2. Click Save |
20 | | - |
21 | | -## CLI commands |
22 | | - |
23 | | -- Mond1SW6:Test <api_token> <sandbox_mode> --no-debug |
24 | | - Will test if api token is valid |
25 | | -- Mond1SW6:Config:ApiToken <api_token> <sandbox_mode> --no-debug |
26 | | - Will set api token to plugin configs |
27 | | -- Mond1SW6:Activate:Payment --no-debug |
28 | | - Will activate plugin as payment method in StoreFront sales channels |
| 1 | +# Mondu Payment Plugin - Complete Installation & Configuration Guide |
| 2 | + |
| 3 | +## 📋 Overview |
| 4 | + |
| 5 | +This plugin provides Mondu payment integration for Shopware 6.7+ with features: |
| 6 | +- Multiple payment methods (Invoice, Installments, SEPA, Pay Now) |
| 7 | +- API credentials validation with interactive button |
| 8 | +- Webhook support for order status updates |
| 9 | +- Admin interface for order management |
| 10 | +- CLI commands for automation |
| 11 | + |
| 12 | +## 🔧 Requirements |
| 13 | + |
| 14 | +- Shopware 6.7+ |
| 15 | +- PHP 8.1+ |
| 16 | +- Node.js 16+ and npm |
| 17 | +- Composer |
| 18 | +- Mondu merchant account with API credentials |
| 19 | + |
| 20 | +## 🚀 Quick Installation |
| 21 | + |
| 22 | +### Option 1: Automated Installation (Recommended) |
| 23 | + |
| 24 | +```bash |
| 25 | +# From Shopware root directory |
| 26 | +./custom/plugins/Mond1SW6/install.sh |
| 27 | +``` |
| 28 | + |
| 29 | +### Option 2: Manual Installation |
| 30 | + |
| 31 | +#### Step 1: Clone the Plugin |
| 32 | +```bash |
| 33 | +git clone <repository-url> custom/plugins/Mond1SW6 |
| 34 | +``` |
| 35 | + |
| 36 | +#### Step 2: Install Dependencies |
| 37 | +```bash |
| 38 | +# Install Node.js dependencies |
| 39 | +cd custom/plugins/Mond1SW6/src/Resources/app/administration |
| 40 | +npm install |
| 41 | + |
| 42 | +# Return to Shopware root |
| 43 | +cd ../../../../.. |
| 44 | + |
| 45 | +# Update Composer autoload |
| 46 | +composer dump-autoload |
| 47 | +``` |
| 48 | + |
| 49 | +#### Step 3: Activate Plugin |
| 50 | +```bash |
| 51 | +# Update plugin configuration |
| 52 | +bin/console bundle:dump |
| 53 | + |
| 54 | +# Install and activate plugin |
| 55 | +bin/console plugin:install --activate Mond1SW6 |
| 56 | + |
| 57 | +# Clear cache |
| 58 | +bin/console cache:clear |
| 59 | +``` |
| 60 | + |
| 61 | +#### Step 4: Build Administration Assets |
| 62 | +```bash |
| 63 | +# Build all administration assets (includes Mondu) |
| 64 | +./bin/build-administration.sh |
| 65 | +``` |
| 66 | + |
| 67 | +## ✅ Verification |
| 68 | + |
| 69 | +After installation, verify that: |
| 70 | + |
| 71 | +1. **Plugin is active:** |
| 72 | + ```bash |
| 73 | + bin/console plugin:list | grep Mond1SW6 |
| 74 | + ``` |
| 75 | + |
| 76 | +2. **JavaScript files are built:** |
| 77 | + ```bash |
| 78 | + ls -la public/bundles/mond1sw6/administration/.vite/ |
| 79 | + ``` |
| 80 | + Should contain: |
| 81 | + - `entrypoints.json` |
| 82 | + - `manifest.json` |
| 83 | + - `assets/mond1-s-w6-[HASH].js` |
| 84 | + |
| 85 | +3. **Validation button works:** |
| 86 | + - Go to Administration > Extensions > My Extensions > Mondu Payment > Configure |
| 87 | + - Look for "Validate API Credentials" button under API Key field |
| 88 | + - Button should trigger API validation |
| 89 | + |
| 90 | +## 📦 Alternative Installation Methods |
| 91 | + |
| 92 | +### Option 3: Install via Shopware Extensions (ZIP Upload) |
| 93 | + |
| 94 | +1. **Upload Extension:** |
| 95 | + - Navigate to Shopware Administration > Extensions > My Extensions |
| 96 | + - Click "Upload Extension" |
| 97 | + - Upload the provided .zip file |
| 98 | + - Click "Install" next to the Mondu Payment extension |
| 99 | + |
| 100 | +2. **Activate Extension:** |
| 101 | + - Click "Activate" button to activate the extension |
| 102 | + |
| 103 | +3. **Build Administration Assets:** |
| 104 | + ```bash |
| 105 | + # After ZIP installation, you still need to build assets |
| 106 | + ./bin/build-administration.sh |
| 107 | + ``` |
| 108 | + |
| 109 | +## 🔧 Configuration |
| 110 | + |
| 111 | +### Step 1: Plugin Configuration |
| 112 | +1. Navigate to Administration > Extensions > My Extensions > Mondu Payment |
| 113 | +2. Click three dots and select "Configure" |
| 114 | +3. Configure the following: |
| 115 | + - **API Key**: Your Mondu API token |
| 116 | + - **Test mode**: Enable for sandbox environment (recommended for testing) |
| 117 | + - **Webhook URL**: Set up webhook endpoint for order updates |
| 118 | +4. **Test API Credentials:** |
| 119 | + - Use the "Validate API Credentials" button |
| 120 | + - Button automatically detects sandbox/live mode |
| 121 | + - Shows success/error messages for validation results |
| 122 | +5. Click "Save" |
| 123 | + |
| 124 | +### Step 2: Activate Payment Method |
| 125 | +1. Navigate to Settings > Payment Methods |
| 126 | +2. Find "Mondu Payment" and click "Edit" |
| 127 | +3. Check "Active" field to activate the payment |
| 128 | +4. Configure additional settings if needed |
| 129 | +5. Click "Save" |
| 130 | + |
| 131 | +### Step 3: Add to Sales Channel |
| 132 | +1. Navigate to Sales Channels > Storefront (or your default channel) |
| 133 | +2. Go to "Payment & Shipping" tab |
| 134 | +3. Add Mondu payment methods to "Payment methods" |
| 135 | +4. Click "Save" |
| 136 | + |
| 137 | +## 🖥️ CLI Commands |
| 138 | + |
| 139 | +The plugin provides several CLI commands for automation: |
| 140 | + |
| 141 | +### Test API Token |
| 142 | +```bash |
| 143 | +bin/console Mond1SW6:Test <api_token> <sandbox_mode> --no-debug |
| 144 | +``` |
| 145 | +- Tests if API token is valid |
| 146 | +- `<api_token>`: Your Mondu API token |
| 147 | +- `<sandbox_mode>`: true/false for sandbox/live mode |
| 148 | + |
| 149 | +### Configure API Token |
| 150 | +```bash |
| 151 | +bin/console Mond1SW6:Config:ApiToken <api_token> <sandbox_mode> --no-debug |
| 152 | +``` |
| 153 | +- Sets API token in plugin configuration |
| 154 | +- Useful for automated deployments |
| 155 | + |
| 156 | +### Activate Payment Method |
| 157 | +```bash |
| 158 | +bin/console Mond1SW6:Activate:Payment --no-debug |
| 159 | +``` |
| 160 | +- Automatically activates plugin as payment method in all StoreFront sales channels |
| 161 | +- Useful for automated setup |
| 162 | + |
| 163 | +## 🐛 Troubleshooting |
| 164 | + |
| 165 | +### JavaScript Not Loading |
| 166 | +If the validation button doesn't appear: |
| 167 | + |
| 168 | +1. **Rebuild administration:** |
| 169 | + ```bash |
| 170 | + ./bin/build-administration.sh |
| 171 | + ``` |
| 172 | + |
| 173 | +2. **Check file permissions:** |
| 174 | + ```bash |
| 175 | + ls -la public/bundles/mond1sw6/administration/ |
| 176 | + ``` |
| 177 | + |
| 178 | +3. **Verify entrypoints.json:** |
| 179 | + ```bash |
| 180 | + cat public/bundles/mond1sw6/administration/.vite/entrypoints.json |
| 181 | + ``` |
| 182 | + |
| 183 | +### Plugin Not Activating |
| 184 | +```bash |
| 185 | +# Check plugin status |
| 186 | +bin/console plugin:list |
| 187 | + |
| 188 | +# Reinstall if needed |
| 189 | +bin/console plugin:uninstall Mond1SW6 |
| 190 | +bin/console plugin:install --activate Mond1SW6 |
| 191 | +``` |
| 192 | + |
| 193 | +### Build Errors |
| 194 | +```bash |
| 195 | +# Clear all caches |
| 196 | +bin/console cache:clear |
| 197 | + |
| 198 | +# Rebuild from scratch |
| 199 | +rm -rf custom/plugins/Mond1SW6/src/Resources/app/administration/node_modules |
| 200 | +cd custom/plugins/Mond1SW6/src/Resources/app/administration |
| 201 | +npm install |
| 202 | +cd ../../../../.. |
| 203 | +./bin/build-administration.sh |
| 204 | +``` |
| 205 | + |
| 206 | +## 📁 File Structure |
| 207 | + |
| 208 | +After successful installation: |
| 209 | + |
| 210 | +``` |
| 211 | +custom/plugins/Mond1SW6/ |
| 212 | +├── install.sh # Installation script |
| 213 | +├── src/Resources/app/administration/ |
| 214 | +│ ├── package.json # Dependencies (in git) |
| 215 | +│ ├── vite.config.ts # Vite config (in git) |
| 216 | +│ ├── src/main.ts # Main JS file (in git) |
| 217 | +│ └── node_modules/ # Generated (ignored) |
| 218 | +└── src/Resources/public/ # Generated (ignored) |
| 219 | +
|
| 220 | +public/bundles/mond1sw6/administration/ |
| 221 | +├── .vite/ |
| 222 | +│ ├── entrypoints.json # Generated |
| 223 | +│ └── manifest.json # Generated |
| 224 | +└── assets/ |
| 225 | + └── mond1-s-w6-[HASH].js # Generated |
| 226 | +``` |
| 227 | + |
| 228 | +## 🔄 Updating the Plugin |
| 229 | + |
| 230 | +```bash |
| 231 | +# Pull latest changes |
| 232 | +git pull origin main |
| 233 | + |
| 234 | +# Reinstall dependencies (if package.json changed) |
| 235 | +cd custom/plugins/Mond1SW6/src/Resources/app/administration |
| 236 | +npm install |
| 237 | + |
| 238 | +# Rebuild |
| 239 | +cd ../../../../.. |
| 240 | +./bin/build-administration.sh |
| 241 | +bin/console cache:clear |
| 242 | +``` |
| 243 | + |
| 244 | +## 🆘 Support |
| 245 | + |
| 246 | +If you encounter issues: |
| 247 | + |
| 248 | +1. Check the Shopware logs: `var/log/` |
| 249 | +2. Check browser console for JavaScript errors |
| 250 | +3. Verify all requirements are met |
| 251 | +4. Try the troubleshooting steps above |
| 252 | + |
| 253 | +--- |
| 254 | + |
| 255 | +**Note:** This plugin requires Shopware 6.7+ and uses Vite for asset compilation. The build process automatically generates hashed JavaScript files for proper caching. |
0 commit comments