-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...ion/Plugin/AclMerchantPortal/SalesPaymentMerchantAclEntityConfigurationExpanderPlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Zed\SalesPaymentMerchant\Communication\Plugin\AclMerchantPortal; | ||
|
||
use Generated\Shared\Transfer\AclEntityMetadataConfigTransfer; | ||
use Generated\Shared\Transfer\AclEntityMetadataTransfer; | ||
use Generated\Shared\Transfer\AclEntityParentMetadataTransfer; | ||
use Spryker\Zed\AclMerchantPortalExtension\Dependency\Plugin\AclEntityConfigurationExpanderPluginInterface; | ||
use Spryker\Zed\Kernel\Communication\AbstractPlugin; | ||
|
||
/** | ||
* @method \Spryker\Zed\SalesPaymentMerchant\Business\SalesPaymentMerchantFacadeInterface getFacade() | ||
* @method \Spryker\Zed\SalesPaymentMerchant\SalesPaymentMerchantConfig getConfig() | ||
* @method \Spryker\Zed\SalesPaymentMerchant\Communication\SalesPaymentMerchantCommunicationFactory getFactory()() | ||
*/ | ||
class SalesPaymentMerchantAclEntityConfigurationExpanderPlugin extends AbstractPlugin implements AclEntityConfigurationExpanderPluginInterface | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* - Expands provided `AclEntityMetadataConfig` transfer object with sales payment merchant payout composite data. | ||
* | ||
* @api | ||
* | ||
* @param \Generated\Shared\Transfer\AclEntityMetadataConfigTransfer $aclEntityMetadataConfigTransfer | ||
* | ||
* @return \Generated\Shared\Transfer\AclEntityMetadataConfigTransfer | ||
*/ | ||
public function expand(AclEntityMetadataConfigTransfer $aclEntityMetadataConfigTransfer): AclEntityMetadataConfigTransfer | ||
{ | ||
$aclEntityMetadataConfigTransfer | ||
->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; | ||
} | ||
} |