| 1 |
<?php |
| 2 |
|
| 3 |
namespace Payplug\PayplugWoocommerce\Gateway\Blocks; |
| 4 |
|
| 5 |
use Payplug\PayplugWoocommerce\PayplugWoocommerceHelper; |
| 6 |
|
| 7 |
class PayplugOney3xWithoutFees extends PayplugOney |
| 8 |
{ |
| 9 |
/** |
| 10 |
* Payment method name/id/slug. |
| 11 |
* |
| 12 |
* @var string |
| 13 |
*/ |
| 14 |
protected $name = 'oney_x3_without_fees'; |
| 15 |
|
| 16 |
protected $icon = 'x3_without_fees_'; |
| 17 |
|
| 18 |
public function get_payment_method_data() |
| 19 |
{ |
| 20 |
$data = parent::get_payment_method_data(); |
| 21 |
|
| 22 |
$country = PayplugWoocommerceHelper::getISOCountryCode(); |
| 23 |
if (file_exists(PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/images/checkout/' . $this->icon . $country . '.svg')) { |
| 24 |
$image = PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/images/checkout/' . $this->icon . $country . '.svg'; |
| 25 |
} else { |
| 26 |
$image = PAYPLUG_GATEWAY_PLUGIN_URL . 'assets/images/checkout/' . $this->icon . 'FR.svg'; |
| 27 |
} |
| 28 |
$data['icon'] = [ |
| 29 |
'src' => $image, |
| 30 |
'class' => 'payplug-payment-icon', |
| 31 |
'alt' => $this->gateway->title, |
| 32 |
]; |
| 33 |
|
| 34 |
return $data; |
| 35 |
} |
| 36 |
} |
| 37 |
|