| 1 |
<?php |
| 2 |
|
| 3 |
namespace Payplug\PayplugWoocommerce\Gateway; |
| 4 |
|
| 5 |
// Exit if accessed directly |
| 6 |
if (!defined('ABSPATH')) { |
| 7 |
exit; |
| 8 |
} |
| 9 |
|
| 10 |
/** |
| 11 |
* PayPlug WooCommerce Gateway. |
| 12 |
*/ |
| 13 |
class PayplugGatewayOney4x extends PayplugGatewayOney3x |
| 14 |
{ |
| 15 |
public function __construct() |
| 16 |
{ |
| 17 |
parent::__construct(); |
| 18 |
$this->id = 'oney_x4_with_fees'; |
| 19 |
$this->method_title = _x('PayPlug Oney 4x', 'Gateway method title', 'payplug'); |
| 20 |
$this->method_description = __('Enable PayPlug Oney 4x for your customers.', 'payplug'); |
| 21 |
$this->title = __('Pay by card in 4x with Oney', 'payplug'); |
| 22 |
$this->has_fields = true; |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* Get payment icons. |
| 27 |
* |
| 28 |
* @return string |
| 29 |
*/ |
| 30 |
public function get_icon() |
| 31 |
{ |
| 32 |
$disable = $this->check_oney_is_available() === true ? '' : 'disable-checkout-icons'; |
| 33 |
$available_img = 'x4_with_fees.svg'; |
| 34 |
|
| 35 |
$icons = apply_filters('payplug_payment_icons', [ |
| 36 |
'payplug' => sprintf('<img src="%s" alt="Oney 4x" class="payplug-payment-icon ' . $disable . '" />', esc_url(PAYPLUG_GATEWAY_PLUGIN_URL . '/assets/images/checkout/' . $available_img)), |
| 37 |
]); |
| 38 |
$icons_str = ''; |
| 39 |
foreach ($icons as $icon) { |
| 40 |
$icons_str .= $icon; |
| 41 |
} |
| 42 |
|
| 43 |
return $icons_str; |
| 44 |
} |
| 45 |
} |
| 46 |
|