From 5a56b3307a47764f2167a32918ad7ee023531fa4 Mon Sep 17 00:00:00 2001 From: Alexander Veselov Date: Fri, 6 Sep 2024 16:27:51 +0300 Subject: [PATCH] ACP-3779 Improved error message when customers Stripe account is not enabled for Stripe Connect. (#11086) ACP-3779 Improved error message when customers Stripe account is not enabled for Stripe Connect. --- composer.json | 1 + .../sales_payment_merchant.transfer.xml | 18 +++++++ ...ntAclEntityConfigurationExpanderPlugin.php | 54 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 src/Spryker/Zed/SalesPaymentMerchant/Communication/Plugin/AclMerchantPortal/SalesPaymentMerchantAclEntityConfigurationExpanderPlugin.php diff --git a/composer.json b/composer.json index 9326f9f..63ba673 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "license": "proprietary", "require": { "php": ">=8.1", + "spryker/acl-merchant-portal-extension": "^1.0.0", "spryker/kernel": "^3.30.0", "spryker/kernel-app": "^1.0.0", "spryker/merchant": "^3.12.0", diff --git a/src/Spryker/Shared/SalesPaymentMerchant/Transfer/sales_payment_merchant.transfer.xml b/src/Spryker/Shared/SalesPaymentMerchant/Transfer/sales_payment_merchant.transfer.xml index d940204..803c7ad 100644 --- a/src/Spryker/Shared/SalesPaymentMerchant/Transfer/sales_payment_merchant.transfer.xml +++ b/src/Spryker/Shared/SalesPaymentMerchant/Transfer/sales_payment_merchant.transfer.xml @@ -219,4 +219,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/Spryker/Zed/SalesPaymentMerchant/Communication/Plugin/AclMerchantPortal/SalesPaymentMerchantAclEntityConfigurationExpanderPlugin.php b/src/Spryker/Zed/SalesPaymentMerchant/Communication/Plugin/AclMerchantPortal/SalesPaymentMerchantAclEntityConfigurationExpanderPlugin.php new file mode 100644 index 0000000..7137022 --- /dev/null +++ b/src/Spryker/Zed/SalesPaymentMerchant/Communication/Plugin/AclMerchantPortal/SalesPaymentMerchantAclEntityConfigurationExpanderPlugin.php @@ -0,0 +1,54 @@ +getAclEntityMetadataCollectionOrFail() + ->addAclEntityMetadata( + 'Orm\Zed\SalesPaymentMerchant\Persistence\SpySalesPaymentMerchantPayout', + (new AclEntityMetadataTransfer()) + ->setEntityName('Orm\Zed\SalesPaymentMerchant\Persistence\SpySalesPaymentMerchantPayout') + ->setParent((new AclEntityParentMetadataTransfer())->setEntityName('Orm\Zed\Merchant\Persistence\SpyMerchant')) + ->setIsSubEntity(true), + ) + ->addAclEntityMetadata( + 'Orm\Zed\SalesPaymentMerchant\Persistence\SpySalesPaymentMerchantPayoutReversal', + (new AclEntityMetadataTransfer()) + ->setEntityName('Orm\Zed\SalesPaymentMerchant\Persistence\SpySalesPaymentMerchantPayoutReversal') + ->setParent((new AclEntityParentMetadataTransfer())->setEntityName('Orm\Zed\Merchant\Persistence\SpyMerchant')) + ->setIsSubEntity(true), + ); + + return $aclEntityMetadataConfigTransfer; + } +}