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:
nurmuhammet committed 2025-11-15 18:51:40 +05:00
1 parent 8637c22ed7
commit c24f7cbac6
9 files changed
+333 -22

No files matched your search

@@ -43,6 +43,11 @@ class OnlinePaymentRepository
*/
protected Response $response;
/**
* Online payment
*/
protected ?OnlinePayment $onlinePayment;
/**
* If payment is successful
*/
@@ -94,13 +99,29 @@ public function generateOrderNumber(): string
/**
* 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 @@ public function createHistory(): void
$data['online_paymantable_type'] = $this->relatedModel::class;
}
OnlinePayment::create($data);
$this->onlinePayment = OnlinePayment::create($data);
}
/**