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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user