<?php

namespace Hyperpay\Gateways\Brands;

use Hyperpay\Gateways\App\DefaultGateway;
use WC_Order;


class Valu extends DefaultGateway
{

  public $trans_mode = 'EXTERNAL';

   public $server_to_server = true;
  /**
   * should be lower case and unique
   * @var string $id 
   */
  public $id = "hyperpay_valu";

  /**
   * The title which appear next to gateway on setting page 
   * @var string $method_title
   */
  public $method_title = "ValU";

  /**
   * Description of gateways which will appear next to title
   * @var string $method_description
   */
  public $method_description = "ValU Plugin for Woocommerce";


  /**
   * 
   * the Brands supported by the gateway
   * @var array $supported_brands
   */
  protected $supported_brands = [
    "VALU" => "ValU",
  ];


  /**
   * to set extra parameter on requested data to connector 
   * just uncomment the function below
   * 
   * @param object $order
   * @return array 
   */

  public function setExtraData(WC_Order $order): array
  {
    $data = [
      "customer.mobile" =>  $order->get_billing_phone(),
    ];

    return ['body' => $data];
  }
}
