fond-of-oryx/gift-card-payment-connector

2.0.0 2023-01-20 13:06 UTC

This package is auto-updated.

Last update: 2024-10-27 13:14:00 UTC


README

PHP from Travis config license

Description

Module provides a configuration for payment methods that are NOT available within gift-cart as payment-method.

Installation

composer require fond-of-oryx/gift-card-payment-connector

Configuration

Register GiftCardPaymentConnectorPaymentMethodFilterPlugin in your PaymentDependencyProvider at getPaymentMethodFilterPlugins()

/**
 * @return \Spryker\Zed\PaymentExtension\Dependency\Plugin\PaymentMethodFilterPluginInterface[]
 */
protected function getPaymentMethodFilterPlugins(): array
{
    return [
        new GiftCardPaymentConnectorPaymentMethodFilterPlugin(),
    ];
}

After that you need to configure which payment-method you want to block while using gift-card as payment-method i.e.

$config[GiftCardPaymentConnectorConstants::NOT_ALLOWED_PAYMENT_METHODS] = [
    'prepaymentPrepayment',
];