fond-of-oryx/product-payment-restriction 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fond-of-oryx/product-payment-restriction

最新稳定版本:2.0.0

Composer 安装命令:

composer require fond-of-oryx/product-payment-restriction

包简介

README 文档

README

license

What it does

restriction on products for payment methods

Installation

composer require fond-of-oryx/product-payment-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 ProductPaymentRestrictionPaymentMethodFilterPlugin(),
    ];
}

add the following configuration to your config-file

$config[ProductPaymentRestrictionConstants::BLACKLISTED_PAYMENT_METHODS_PRODUCT_ATTRIBUTE] = 'blacklisted_payment_methods';

The attribute where the blacklisted payment methods are stored is expected a comma separated list. The list should contain the specific payment methods from the shop that are not permitted for the product.

####Example

$product = [
    'abstract_attributes' => [
        '_' => [
            'blacklisted_payment_methods' => 'invoice',
        ]
    ]
]

统计信息

  • 总下载量: 12.96k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-08