# multisafepay/trunk/src/PaymentMethods/Base/BaseBrandedPaymentMethod.php

MultiSafepay plugin for WooCommerce, version trunk. 59 lines.

- Page: https://pluginprobe.com/plugins/multisafepay/trunk/code/src/PaymentMethods/Base/BaseBrandedPaymentMethod.php
- Raw: https://pluginprobe.com/plugins/multisafepay/trunk/raw/src/PaymentMethods/Base/BaseBrandedPaymentMethod.php
- Modified: 2024-07-08T14:27:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/multisafepay/trunk/code/src/PaymentMethods/Base/BaseBrandedPaymentMethod.php#L10-L20`.

```php
<?php declare( strict_types=1 );

namespace MultiSafepay\WooCommerce\PaymentMethods\Base;

use MultiSafepay\Api\PaymentMethods\PaymentMethod;
use MultiSafepay\WooCommerce\Services\PaymentMethodService;

/**
 * Class BaseGiftCardPaymentMethod
 *
 * @package MultiSafepay\WooCommerce\PaymentMethods\Base
 */
class BaseBrandedPaymentMethod extends BasePaymentMethod {

    /**
     * @var array
     */
    protected $brand;

    /**
     * @param PaymentMethod $payment_method
     * @param array         $brand
     */
    public function __construct( PaymentMethod $payment_method, array $brand ) {
        $this->brand = $brand;
        parent::__construct( $payment_method );
    }

    /**
     * @return string
     */
    public function get_payment_method_gateway_code(): string {
        return $this->payment_method->getId();
    }

    /**
     * @return string
     */
    public function get_payment_method_title(): string {
        return $this->brand['name'];
    }

    /**
     * @return string
     */
    public function get_payment_method_icon(): string {
        return $this->brand['icon_urls']['large'];
    }

    /**
     * @return string
     */
    public function get_payment_method_id(): string {
        return PaymentMethodService::get_legacy_woocommerce_payment_gateway_ids( $this->brand['id'] );
    }


}

```
