Refactor payment processing: update method names for clarity, enhance VisaMasterPaymentOrderRepository with payment validation logic, and improve Turkish translations for payment notifications.

This commit is contained in:
2025-11-15 18:51:40 +05:00
parent 8637c22ed7
commit c24f7cbac6
9 changed files with 333 additions and 22 deletions

View File

@@ -43,6 +43,11 @@ class OnlinePaymentRepository
*/
protected Response $response;
/**
* Online payment
*/
protected ?OnlinePayment $onlinePayment;
/**
* If payment is successful
*/
@@ -94,13 +99,29 @@ class OnlinePaymentRepository
/**
* Payment provder
*/
public function paymentProvider(PaymentProviderContract $provider): self
public function setPaymentProvider(PaymentProviderContract $provider): self
{
$this->provider = $provider;
return $this;
}
/**
* Payment provider
*/
public function paymentProvider(): PaymentProviderContract
{
return $this->provider;
}
/**
* Online payment
*/
public function onlinePayment(): ?OnlinePayment
{
return $this->onlinePayment;
}
/**
* If payment has been successfull
*/
@@ -180,7 +201,7 @@ class OnlinePaymentRepository
$data['online_paymantable_type'] = $this->relatedModel::class;
}
OnlinePayment::create($data);
$this->onlinePayment = OnlinePayment::create($data);
}
/**