<?php

namespace App\Services\Payment;

class Payment
{

    private array $paymentData = [];
    private PaymentInterface $payment;

    public function __construct(PaymentInterface $payment, $inputData)
    {
        $this->paymentData = $inputData;
        $this->payment = $payment;
    }

    public function pay()
    {
        return $this->payment->makePayment($this->payment->prepareData($this->paymentData));
    }

    public function makeRecurringPayment()
    {
        return $this->payment->makeRecurringPayment($this->paymentData);
    }

    public  function  deleteSubscription()
    {
        return $this->payment->deleteRecurringPayment($this->paymentData);
    }
    public  function  getSubscriptionInfoBySubscriptionId()
    {
        return $this->payment->getRecurringInfoBySubscriptionId($this->paymentData);
    }

}
