fond-of-oryx / payment-total-amount-restriction
2.0.0
2023-01-20 14:07 UTC
Requires
- php: >=8.0
- spryker/payment-extension: ^1.0.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-27 12:52:00 UTC
README
What it does
restriction maximum allowed total amount for payment methods
Installation
composer require fond-of-oryx/payment-total-amount-restriction
Usage
register the plugin in your dependency provider
i.E.: Pyz\Zed\Payment\PaymentDependencyProvider.php
/**
* @return array<int, \Spryker\Zed\PaymentExtension\Dependency\Plugin\PaymentMethodFilterPluginInterface>|array<int, \Spryker\Zed\Payment\Dependency\Plugin\Payment\PaymentMethodFilterPluginInterface>
*/
protected function getPaymentMethodFilterPlugins(): array
{
return [
...,
new TotalAmountRestrictionPaymentMethodFilterPlugin(),
];
}
add the following configuration to your config-file
$config[PaymentTotalAmountRestrictionConstants::TOTAL_AMOUNT_RESTRICTED_PAYMENT_METHOD_COMBINATIONS] = [
'payment-method-name => 500000 // max amount 500.00
];