Files
Credit-Zombies/app/Services/Payment/Payment.php
2026-06-24 18:29:01 +06:00

37 lines
845 B
PHP

<?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);
}
}