Example #1
0
 /**
  * 2016-02-11
  * @override
  * How is a payment method's canUseForCountry() used? https://mage2.pro/t/682
  * The method @see \Magento\Payment\Model\Method\AbstractMethod::canUseForCountry()
  * can be simplified: https://mage2.pro/t/683
  *
  * @see \Magento\Payment\Model\MethodInterface::canUseForCountry()
  * https://github.com/magento/magento2/blob/6ce74b2/app/code/Magento/Payment/Model/MethodInterface.php#L184-L190
  * @see \Magento\Payment\Model\Method\AbstractMethod::canUseForCountry()
  * https://github.com/magento/magento2/blob/6ce74b2/app/code/Magento/Payment/Model/Method/AbstractMethod.php#L464-L482
  * @param string $country
  * @return bool
  */
 public function canUseForCountry($country)
 {
     return NWB::is($this->s('country_restriction'), $country, df_csv_parse($this->s('countries')));
 }
Example #2
0
 /**
  * 2016-06-09
  * Если опция не задана, но метод возвращает «нет».
  * Если опция задана, то смотрим уже тип ограничения: белый или чёрный список.
  * @param string $suffix
  * @param string $value
  * @param string|null $key [optional]
  * @param null|string|int|S|Store $s [optional]
  * @return string[]
  */
 protected function nwbn($suffix, $value, $key = null, $s = null)
 {
     $key = $key ?: df_caller_f();
     return NWB::isNegative($this->v($key, $s), $value, $this->csv($key . '_' . $suffix, $s));
 }