From fc932d881a95572d616312b8b3052627dcd38582 Mon Sep 17 00:00:00 2001 From: Anitche Chisom Date: Thu, 8 Oct 2026 09:35:03 +0200 Subject: [PATCH 1/5] refactor(paystack): rename plugin from KommandhubPaystackSW to KmhPaystackSW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Systematically rename the Paystack payment plugin to use the shorter 'Kmh' prefix instead of 'Kommandhub', improving consistency across the plugin ecosystem while maintaining backward compatibility through the existing PHP namespace. Changes: - Plugin directory: KommandhubPaystackSW/ → KmhPaystackSW/ - Plugin class: KommandhubPaystackSW → KmhPaystackSW - Custom field set: kommandhub_paystack_fieldset → kmh_paystack_fieldset - Custom fields: kommandhub_paystack_* → kmh_paystack_* - Payment method: kommandhub_paystack_payment → kmh_paystack_payment - Routes: kommandhub_paystack_* → kmh_paystack_* - Admin components: kommandhub-paystack-detail → kmh-paystack-detail - Translation keys: kommandhub-paystack-* → kmh-paystack-* - Built assets: kommandhub-paystack-s-w-* → kmh-paystack-s-w-* - Test files: KommandhubPaystackSWTest → KmhPaystackSWTest Preserved: - PHP namespace: Kommandhub\PaystackSW (unchanged) - Composer package: kommandhub/paystack-sw (unchanged) Breaking Changes: - Database: Custom field names will change on plugin update - Database: Payment method technical name will change on plugin update - The plugin's update() method handles migration automatically Updated 32 files including PHP classes, configuration, translations, tests, and documentation. All tests passing. --- CLAUDE.md | 4 +- Makefile | 6 +- README.md | 18 +-- composer.json | 12 +- docker-compose.yml | 12 +- .../Controller/BankVerificationController.php | 10 +- .../Payment/Service/PayloadBuilder.php | 3 +- src/Installer/CustomFieldsInstaller.php | 12 +- src/Installer/PaymentMethodInstaller.php | 4 +- ...andhubPaystackSW.php => KmhPaystackSW.php} | 4 +- src/Resources/app/administration/src/main.js | 10 +- .../app/administration/src/snippet/de-DE.json | 2 +- .../app/administration/src/snippet/en-GB.json | 2 +- .../app/administration/src/snippet/fr-FR.json | 2 +- .../icon.png | Bin .../index.js | 42 +++--- .../kmh-paystack-detail.html.twig} | 136 +++++++++--------- .../kmh-paystack-detail.scss} | 8 +- src/Resources/config/routes.yml | 6 +- .../administration/.vite/entrypoints.json | 8 +- .../public/administration/.vite/manifest.json | 10 +- ...SZ4U.css => kmh-paystack-s-w-Bqi7SZ4U.css} | 0 ...nlwT5p.js => kmh-paystack-s-w-CbnlwT5p.js} | 0 ...s.map => kmh-paystack-s-w-CbnlwT5p.js.map} | 0 .../snippet/de_DE/storefront.de-DE.json | 2 +- .../snippet/en_GB/storefront.en-GB.json | 2 +- .../snippet/fr_FR/storefront.fr-FR.json | 2 +- .../storefront/page/account/bank.html.twig | 18 +-- .../page/account/profile/index.html.twig | 28 ++-- .../Installer/CustomFieldsInstallerTest.php | 2 +- ...ystackSWTest.php => KmhPaystackSWTest.php} | 14 +- tests/TestBootstrap.php | 2 +- .../Installer/PaymentMethodInstallerTest.php | 2 +- ...ystackSWTest.php => KmhPaystackSWTest.php} | 10 +- 34 files changed, 196 insertions(+), 197 deletions(-) rename src/{KommandhubPaystackSW.php => KmhPaystackSW.php} (98%) rename src/Resources/app/administration/src/view/{kommandhub-paystack-detail => kmh-paystack-detail}/icon.png (100%) rename src/Resources/app/administration/src/view/{kommandhub-paystack-detail => kmh-paystack-detail}/index.js (91%) rename src/Resources/app/administration/src/view/{kommandhub-paystack-detail/kommandhub-paystack-detail.html.twig => kmh-paystack-detail/kmh-paystack-detail.html.twig} (62%) rename src/Resources/app/administration/src/view/{kommandhub-paystack-detail/kommandhub-paystack-detail.scss => kmh-paystack-detail/kmh-paystack-detail.scss} (82%) rename src/Resources/public/administration/assets/{kommandhub-paystack-s-w-Bqi7SZ4U.css => kmh-paystack-s-w-Bqi7SZ4U.css} (100%) rename src/Resources/public/administration/assets/{kommandhub-paystack-s-w-CbnlwT5p.js => kmh-paystack-s-w-CbnlwT5p.js} (100%) rename src/Resources/public/administration/assets/{kommandhub-paystack-s-w-CbnlwT5p.js.map => kmh-paystack-s-w-CbnlwT5p.js.map} (100%) rename tests/Integration/Plugin/{KommandhubPaystackSWTest.php => KmhPaystackSWTest.php} (93%) rename tests/Unit/{KommandhubPaystackSWTest.php => KmhPaystackSWTest.php} (96%) diff --git a/CLAUDE.md b/CLAUDE.md index 6cc2810..a0acf96 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# KommandhubPaystackSW +# KmhPaystackSW Shopware 6 payment plugin integrating Paystack (cards, bank transfer, USSD) with refunds, webhooks, bank-account verification, and African currency/language @@ -7,7 +7,7 @@ support. PHP namespace root: `Kommandhub\PaystackSW\` → `src/`. ## Commands All commands run inside the Docker dev stack (see `Makefile`). The plugin lives -at `custom/static-plugins/KommandhubPaystackSW` inside a Shopware install. +at `custom/static-plugins/KmhPaystackSW` inside a Shopware install. - `make up` / `make down` — start / tear down the stack - `make test` — PHPUnit (`phpunit.dist.xml`). Filter: `make test FILTER=SomeTest` diff --git a/Makefile b/Makefile index 7b241f9..084bc55 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,14 @@ .PHONY: help up down build restart shell plugin-list test test-coverage cs cs-fix analyse fixture-load resync prepare validate-plugin cli changelog zip CONTAINER := shopware -PLUGIN_DIR := custom/static-plugins/KommandhubPaystackSW +PLUGIN_DIR := custom/static-plugins/KmhPaystackSW # Plugins installed via composer STATIC_PLUGINS := \ - kommandhub/foundation-sw:KommandhubFoundationSW \ - kommandhub/paystack-sw:KommandhubPaystackSW + kommandhub/paystack-sw:KmhPaystackSW # Only plugins that should be copied into custom/static-plugins STATIC_COPY_PLUGINS := \ - kommandhub/foundation-sw:KommandhubFoundationSW # This plugin may ship at any stability (see "version" in composer.json), while # the Shopware install it is tested against pins minimum-stability to "stable". diff --git a/README.md b/README.md index 597061f..4eb5dca 100644 --- a/README.md +++ b/README.md @@ -163,9 +163,9 @@ Paystack refund created ──► refund.pending / refund.processed webhooks upd ## Directory Structure ```text -KommandhubPaystackSW/ +KmhPaystackSW/ ├── src/ -│ ├── KommandhubPaystackSW.php # Plugin base class (lifecycle hooks) +│ ├── KmhPaystackSW.php # Plugin base class (lifecycle hooks) │ ├── Administration/ │ │ └── Controller/RefundController.php # Admin refund API endpoint │ ├── BankVerification/ @@ -239,7 +239,7 @@ KommandhubPaystackSW/ ```bash composer require kommandhub/paystack-sw bin/console plugin:refresh -bin/console plugin:install --activate KommandhubPaystackSW +bin/console plugin:install --activate KmhPaystackSW bin/console cache:clear ``` @@ -259,8 +259,8 @@ The repository ships a Docker Compose stack based on [`dockware`](https://dockwa ```bash # 1. Clone the repository -git clone KommandhubPaystackSW -cd KommandhubPaystackSW +git clone KmhPaystackSW +cd KmhPaystackSW # 2. Start the stack (builds the container and prepares the shop) make up @@ -268,12 +268,12 @@ make up # 3. Install and activate the plugin inside the container make shell bin/console plugin:refresh -bin/console plugin:install --activate KommandhubPaystackSW +bin/console plugin:install --activate KmhPaystackSW bin/console cache:clear exit ``` -The plugin directory is mounted at `/var/www/html/custom/static-plugins/KommandhubPaystackSW`; `.git/`, `node_modules/`, and `vendor/` are excluded from the mount. Changes to source files on the host are reflected immediately in the container. +The plugin directory is mounted at `/var/www/html/custom/static-plugins/KmhPaystackSW`; `.git/`, `node_modules/`, and `vendor/` are excluded from the mount. Changes to source files on the host are reflected immediately in the container. Default dockware credentials: @@ -345,7 +345,7 @@ make cs-fix && make analyse && make test ## Configuration Options -Configure the plugin under **Extensions → My Extensions → Paystack → Configuration**. Options are stored in Shopware's system configuration under the `KommandhubPaystackSW.config.*` domain and read through `Setting\Service\Config`. +Configure the plugin under **Extensions → My Extensions → Paystack → Configuration**. Options are stored in Shopware's system configuration under the `KmhPaystackSW.config.*` domain and read through `Setting\Service\Config`. | Key | Type | Purpose | | --- | --- | --- | @@ -470,7 +470,7 @@ Logging goes through `Logging\ConfigurableLogger`, wired to the `paystack_channe 2. Run: ```bash bin/console plugin:refresh - bin/console plugin:update KommandhubPaystackSW # migrates handler identifier + custom fields + bin/console plugin:update KmhPaystackSW # migrates handler identifier + custom fields bin/console cache:clear ``` 3. Ensure compiled Administration and Storefront assets are built and committed as part of the release. diff --git a/composer.json b/composer.json index 96b80a6..71c070b 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "kommandhub/paystack-sw", "description": "Independent, third-party Shopware 6 integration for the Paystack payment gateway: accept secure payments via cards, bank transfers, USSD, and mobile money across Africa. Not affiliated with, endorsed by, or officially connected to Paystack.", "type": "shopware-platform-plugin", - "version": "0.9.0-beta.2", + "version": "0.9.0-beta", "license": "Apache-2.0", "keywords": [ "shopware", @@ -22,7 +22,7 @@ "nigeria", "ecommerce" ], - "homepage": "https://github.com/KommandHub/KommandhubPaystackSW", + "homepage": "https://github.com/KommandHub/KmhPaystackSW", "authors": [ { "name": "Kommandhub Limited", @@ -33,9 +33,9 @@ ], "support": { "email": "info@kommandhub.com", - "issues": "https://github.com/KommandHub/KommandhubPaystackSW/issues", - "source": "https://github.com/KommandHub/KommandhubPaystackSW", - "docs": "https://github.com/KommandHub/KommandhubPaystackSW/blob/main/README.md" + "issues": "https://github.com/KommandHub/KmhPaystackSW/issues", + "source": "https://github.com/KommandHub/KmhPaystackSW", + "docs": "https://github.com/KommandHub/KmhPaystackSW/blob/main/README.md" }, "require": { "shopware/core": "~6.6.0 || ~6.7.0", @@ -59,7 +59,7 @@ } }, "extra": { - "shopware-plugin-class": "Kommandhub\\PaystackSW\\KommandhubPaystackSW", + "shopware-plugin-class": "Kommandhub\\PaystackSW\\KmhPaystackSW", "label": { "de-DE": "Paystack-Zahlung von Kommandhub", "en-GB": "Paystack Payment by Kommandhub", diff --git a/docker-compose.yml b/docker-compose.yml index 4cdc17e..4c8ff6e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,23 +5,23 @@ services: build: context: . dockerfile: Dockerfile - image: 'kommandhub-paystack-plugin:6.7.8.0' - container_name: kommandhub-paystack-plugin + image: 'kmh-paystack-plugin:6.7.8.0' + container_name: kmh-paystack-plugin environment: - 'XDEBUG_ENABLED=0' - 'PHP_VERSION=8.3' volumes: # ---------------------------------------------------------------------------------------------------------------------------------- # PLUGINS - - "./:/var/www/html/custom/static-plugins/KommandhubPaystackSW" + - "./:/var/www/html/custom/static-plugins/KmhPaystackSW" - "database:/var/lib/mysql" - "./Makefile:/var/www/html/Makefile" # - ".env.test:/var/www/html/.env.test" # ---------------------------------------------------------------------------------------------------------------------------------- # EXCLUDE - - "/var/www/html/custom/static-plugins/KommandhubPaystackSW/.git/" - - "/var/www/html/custom/static-plugins/KommandhubPaystackSW/node_modules/" - - "/var/www/html/custom/static-plugins/KommandhubPaystackSW/vendor/" + - "/var/www/html/custom/static-plugins/KmhPaystackSW/.git/" + - "/var/www/html/custom/static-plugins/KmhPaystackSW/node_modules/" + - "/var/www/html/custom/static-plugins/KmhPaystackSW/vendor/" # ---------------------------------------------------------------------------------------------------------------------------------- volumes: diff --git a/src/BankVerification/Controller/BankVerificationController.php b/src/BankVerification/Controller/BankVerificationController.php index 36498a8..48b7902 100644 --- a/src/BankVerification/Controller/BankVerificationController.php +++ b/src/BankVerification/Controller/BankVerificationController.php @@ -139,11 +139,11 @@ public function saveBank(RequestDataBag $data, SalesChannelContext $context, Cus [ 'id' => $customer->getId(), 'customFields' => [ - 'kommandhub_paystack_bank_name' => $data->get('bankName'), - 'kommandhub_paystack_bank_code' => $data->get('bankCode'), - 'kommandhub_paystack_account_number' => $data->get('accountNumber'), - 'kommandhub_paystack_account_name' => $data->get('accountName'), - 'kommandhub_paystack_bvn' => $data->get('bvn'), + 'kmh_paystack_bank_name' => $data->get('bankName'), + 'kmh_paystack_bank_code' => $data->get('bankCode'), + 'kmh_paystack_account_number' => $data->get('accountNumber'), + 'kmh_paystack_account_name' => $data->get('accountName'), + 'kmh_paystack_bvn' => $data->get('bvn'), ], ], ], $context->getContext()); diff --git a/src/Checkout/Payment/Service/PayloadBuilder.php b/src/Checkout/Payment/Service/PayloadBuilder.php index dffb88e..58fa407 100644 --- a/src/Checkout/Payment/Service/PayloadBuilder.php +++ b/src/Checkout/Payment/Service/PayloadBuilder.php @@ -255,12 +255,13 @@ private function buildMetadata(OrderEntity $order, array $selectedMetaData, stri private function formatAddress(OrderAddressEntity $address): string { return sprintf( - '%s %s, %s, %s %s, %s', + '%s %s, %s, %s %s, %s, %s', $address->getFirstName(), $address->getLastName(), $address->getStreet(), $address->getZipcode(), $address->getCity(), + $address->getCountryState() ? $address->getCountryState()->getName() : '', $address->getCountry() ? $address->getCountry()->getName() : '' ); } diff --git a/src/Installer/CustomFieldsInstaller.php b/src/Installer/CustomFieldsInstaller.php index 868300b..ee7a71b 100644 --- a/src/Installer/CustomFieldsInstaller.php +++ b/src/Installer/CustomFieldsInstaller.php @@ -14,7 +14,7 @@ class CustomFieldsInstaller { - private const CUSTOM_FIELDSET_NAME = 'kommandhub_paystack_fieldset'; + private const CUSTOM_FIELDSET_NAME = 'kmh_paystack_fieldset'; private const CUSTOM_FIELDSET = [ 'name' => self::CUSTOM_FIELDSET_NAME, @@ -28,7 +28,7 @@ class CustomFieldsInstaller ], 'customFields' => [ [ - 'name' => 'kommandhub_paystack_bank_name', + 'name' => 'kmh_paystack_bank_name', 'type' => CustomFieldTypes::TEXT, 'config' => [ 'label' => [ @@ -41,7 +41,7 @@ class CustomFieldsInstaller ], ], [ - 'name' => 'kommandhub_paystack_bank_code', + 'name' => 'kmh_paystack_bank_code', 'type' => CustomFieldTypes::TEXT, 'config' => [ 'label' => [ @@ -54,7 +54,7 @@ class CustomFieldsInstaller ], ], [ - 'name' => 'kommandhub_paystack_account_number', + 'name' => 'kmh_paystack_account_number', 'type' => CustomFieldTypes::TEXT, 'config' => [ 'label' => [ @@ -67,7 +67,7 @@ class CustomFieldsInstaller ], ], [ - 'name' => 'kommandhub_paystack_account_name', + 'name' => 'kmh_paystack_account_name', 'type' => CustomFieldTypes::TEXT, 'config' => [ 'label' => [ @@ -80,7 +80,7 @@ class CustomFieldsInstaller ], ], [ - 'name' => 'kommandhub_paystack_bvn', + 'name' => 'kmh_paystack_bvn', 'type' => CustomFieldTypes::TEXT, 'config' => [ 'label' => [ diff --git a/src/Installer/PaymentMethodInstaller.php b/src/Installer/PaymentMethodInstaller.php index 055278b..9967351 100644 --- a/src/Installer/PaymentMethodInstaller.php +++ b/src/Installer/PaymentMethodInstaller.php @@ -53,7 +53,7 @@ public function install(string $pluginClass, Context $context): void 'name' => 'Pay with Paystack', 'description' => 'Securely pay with card, bank transfer or mobile money via Paystack.', 'pluginId' => $pluginId, - 'technicalName' => 'kommandhub_paystack_payment', + 'technicalName' => 'kmh_paystack_payment', 'afterOrderEnabled' => true, 'active' => true, ], @@ -113,7 +113,7 @@ private function getPaymentMethodId(Context $context): ?string { $criteria = new Criteria(); $criteria->addFilter( - new EqualsFilter('technicalName', 'kommandhub_paystack_payment') + new EqualsFilter('technicalName', 'kmh_paystack_payment') ); $paymentId = $this->paymentMethodRepository diff --git a/src/KommandhubPaystackSW.php b/src/KmhPaystackSW.php similarity index 98% rename from src/KommandhubPaystackSW.php rename to src/KmhPaystackSW.php index 511bc9c..8f89a39 100644 --- a/src/KommandhubPaystackSW.php +++ b/src/KmhPaystackSW.php @@ -24,7 +24,7 @@ use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; /** - * Main Shopware plugin class for Kommandhub Paystack integration. + * Main Shopware plugin class for Kmh Paystack integration. * * Responsibilities: * - Registers plugin services (via Symfony container) @@ -32,7 +32,7 @@ * - Creates and maintains Paystack payment method * - Installs custom fields required for integration */ -class KommandhubPaystackSW extends Plugin +class KmhPaystackSW extends Plugin { /** * Allow composer commands during plugin execution. diff --git a/src/Resources/app/administration/src/main.js b/src/Resources/app/administration/src/main.js index 5cfc06e..92487cf 100644 --- a/src/Resources/app/administration/src/main.js +++ b/src/Resources/app/administration/src/main.js @@ -15,18 +15,18 @@ Shopware.Service().register('paystackRefundService', (container) => { import './acl'; import './module/sw-order/page/sw-order-detail' -import './view/kommandhub-paystack-detail' +import './view/kmh-paystack-detail' -Shopware.Module.register('kommandhub-paystack-detail', { +Shopware.Module.register('kmh-paystack-detail', { routeMiddleware(next, currentRoute) { if (currentRoute.name === 'sw.order.detail') { - const paystackRoute = 'kommandhub.paystack.detail'; + const paystackRoute = 'kmh.paystack.detail'; if (!currentRoute.children.some(child => child.name === paystackRoute)) { currentRoute.children.push({ name: paystackRoute, - path: 'kommandhub/paystack', - component: 'kommandhub-paystack-detail', + path: 'kmh/paystack', + component: 'kmh-paystack-detail', meta: { parentPath: 'sw.order.detail', privilege: 'order.viewer', diff --git a/src/Resources/app/administration/src/snippet/de-DE.json b/src/Resources/app/administration/src/snippet/de-DE.json index 6ef1d1d..93d2a8d 100644 --- a/src/Resources/app/administration/src/snippet/de-DE.json +++ b/src/Resources/app/administration/src/snippet/de-DE.json @@ -1,5 +1,5 @@ { - "kommandhub-paystack-detail": { + "kmh-paystack-detail": { "title": "Paystack", "summary": { "chargedAmount": "Abgerechneter Betrag", diff --git a/src/Resources/app/administration/src/snippet/en-GB.json b/src/Resources/app/administration/src/snippet/en-GB.json index a59f84f..d61c154 100644 --- a/src/Resources/app/administration/src/snippet/en-GB.json +++ b/src/Resources/app/administration/src/snippet/en-GB.json @@ -1,5 +1,5 @@ { - "kommandhub-paystack-detail": { + "kmh-paystack-detail": { "title": "Paystack", "summary": { "chargedAmount": "Charged Amount", diff --git a/src/Resources/app/administration/src/snippet/fr-FR.json b/src/Resources/app/administration/src/snippet/fr-FR.json index 6b07b76..afe5e04 100644 --- a/src/Resources/app/administration/src/snippet/fr-FR.json +++ b/src/Resources/app/administration/src/snippet/fr-FR.json @@ -1,5 +1,5 @@ { - "kommandhub-paystack-detail": { + "kmh-paystack-detail": { "title": "Paystack", "summary": { "chargedAmount": "Montant débité", diff --git a/src/Resources/app/administration/src/view/kommandhub-paystack-detail/icon.png b/src/Resources/app/administration/src/view/kmh-paystack-detail/icon.png similarity index 100% rename from src/Resources/app/administration/src/view/kommandhub-paystack-detail/icon.png rename to src/Resources/app/administration/src/view/kmh-paystack-detail/icon.png diff --git a/src/Resources/app/administration/src/view/kommandhub-paystack-detail/index.js b/src/Resources/app/administration/src/view/kmh-paystack-detail/index.js similarity index 91% rename from src/Resources/app/administration/src/view/kommandhub-paystack-detail/index.js rename to src/Resources/app/administration/src/view/kmh-paystack-detail/index.js index 68c7f8b..c3b39be 100644 --- a/src/Resources/app/administration/src/view/kommandhub-paystack-detail/index.js +++ b/src/Resources/app/administration/src/view/kmh-paystack-detail/index.js @@ -1,5 +1,5 @@ -import template from './kommandhub-paystack-detail.html.twig'; -import './kommandhub-paystack-detail.scss'; +import template from './kmh-paystack-detail.html.twig'; +import './kmh-paystack-detail.scss'; import icon from './icon.png'; import { PAYSTACK_HANDLER_IDENTIFIER, isAbortError } from '../../util/paystack'; import { @@ -11,7 +11,7 @@ import { const { Store, Mixin } = Shopware; const { Criteria } = Shopware.Data; -Shopware.Component.register('kommandhub-paystack-detail', { +Shopware.Component.register('kmh-paystack-detail', { template, mixins: [ @@ -21,7 +21,7 @@ Shopware.Component.register('kommandhub-paystack-detail', { /** @private */ metaInfo() { return { - title: this.$t('kommandhub-paystack-detail.title'), + title: this.$t('kmh-paystack-detail.title'), }; }, @@ -151,28 +151,28 @@ Shopware.Component.register('kommandhub-paystack-detail', { return [ { property: 'amount', - label: 'kommandhub-paystack-detail.summary.chargedAmount', + label: 'kmh-paystack-detail.summary.chargedAmount', primary: true, }, { property: 'reference', - label: 'kommandhub-paystack-detail.grid.reference', + label: 'kmh-paystack-detail.grid.reference', }, { property: 'transactionId', - label: 'kommandhub-paystack-detail.grid.transactionId', + label: 'kmh-paystack-detail.grid.transactionId', }, { property: 'fee', - label: 'kommandhub-paystack-detail.grid.processingFee', + label: 'kmh-paystack-detail.grid.processingFee', }, { property: 'state', - label: 'kommandhub-paystack-detail.grid.state', + label: 'kmh-paystack-detail.grid.state', }, { property: 'verifiedAt', - label: 'kommandhub-paystack-detail.grid.verifiedAt', + label: 'kmh-paystack-detail.grid.verifiedAt', }, ]; }, @@ -186,20 +186,20 @@ Shopware.Component.register('kommandhub-paystack-detail', { return [ { property: 'amount', - label: 'kommandhub-paystack-detail.captures.grid.amount', + label: 'kmh-paystack-detail.captures.grid.amount', primary: true, }, { property: 'state', - label: 'kommandhub-paystack-detail.captures.grid.state', + label: 'kmh-paystack-detail.captures.grid.state', }, { property: 'externalReference', - label: 'kommandhub-paystack-detail.captures.grid.externalReference', + label: 'kmh-paystack-detail.captures.grid.externalReference', }, { property: 'createdAt', - label: 'kommandhub-paystack-detail.captures.grid.createdAt', + label: 'kmh-paystack-detail.captures.grid.createdAt', }, ]; }, @@ -213,24 +213,24 @@ Shopware.Component.register('kommandhub-paystack-detail', { return [ { property: 'amount', - label: 'kommandhub-paystack-detail.refunds.grid.amount', + label: 'kmh-paystack-detail.refunds.grid.amount', primary: true, }, { property: 'state', - label: 'kommandhub-paystack-detail.refunds.grid.state', + label: 'kmh-paystack-detail.refunds.grid.state', }, { property: 'externalReference', - label: 'kommandhub-paystack-detail.refunds.grid.externalReference', + label: 'kmh-paystack-detail.refunds.grid.externalReference', }, { property: 'reason', - label: 'kommandhub-paystack-detail.refunds.grid.reason', + label: 'kmh-paystack-detail.refunds.grid.reason', }, { property: 'createdAt', - label: 'kommandhub-paystack-detail.refunds.grid.createdAt', + label: 'kmh-paystack-detail.refunds.grid.createdAt', }, ]; }, @@ -509,7 +509,7 @@ Shopware.Component.register('kommandhub-paystack-detail', { onConfirmRefund() { if (this.refundAmount < this.minRefundableAmount) { this.createNotificationError({ - message: this.$t('kommandhub-paystack-detail.refund.errorAmountTooLow', { + message: this.$t('kmh-paystack-detail.refund.errorAmountTooLow', { minAmount: this.currencyFilter(this.minRefundableAmount, this.refundCurrency), }), }); @@ -518,7 +518,7 @@ Shopware.Component.register('kommandhub-paystack-detail', { if (this.refundAmount > this.maxRefundableAmount) { this.createNotificationError({ - message: this.$t('kommandhub-paystack-detail.refund.errorAmountTooHigh', { + message: this.$t('kmh-paystack-detail.refund.errorAmountTooHigh', { maxAmount: this.currencyFilter(this.maxRefundableAmount, this.refundCurrency), }), }); diff --git a/src/Resources/app/administration/src/view/kommandhub-paystack-detail/kommandhub-paystack-detail.html.twig b/src/Resources/app/administration/src/view/kmh-paystack-detail/kmh-paystack-detail.html.twig similarity index 62% rename from src/Resources/app/administration/src/view/kommandhub-paystack-detail/kommandhub-paystack-detail.html.twig rename to src/Resources/app/administration/src/view/kmh-paystack-detail/kmh-paystack-detail.html.twig index 4a70c7f..eee0d86 100644 --- a/src/Resources/app/administration/src/view/kommandhub-paystack-detail/kommandhub-paystack-detail.html.twig +++ b/src/Resources/app/administration/src/view/kmh-paystack-detail/kmh-paystack-detail.html.twig @@ -1,83 +1,83 @@ {% block sw_order_document_card %} - {% block kommandhub_paystack_detail_card %} + {% block kmh_paystack_detail_card %} - {% block kommandhub_paystack_detail_card_banner %} - {% block kommandhub_paystack_detail_card_banner_wrapper %} + {% block kmh_paystack_detail_card_banner %} + {% block kmh_paystack_detail_card_banner_wrapper %}
- {% block kommandhub_paystack_detail_card_banner_icon %} + {% block kmh_paystack_detail_card_banner_icon %} Paystack logo {% endblock %} - {% block kommandhub_paystack_detail_card_banner_title %} -

- {{ $t('kommandhub-paystack-detail.header') }} + {% block kmh_paystack_detail_card_banner_title %} +

+ {{ $t('kmh-paystack-detail.header') }}

{% endblock %}
{% endblock %} {% endblock %} - {% block kommandhub_paystack_detail_card_grid %} + {% block kmh_paystack_detail_card_grid %}