wip
This commit is contained in:
@@ -191,6 +191,8 @@ class OnlinePaymentRepository
|
||||
|
||||
return $this->paymentFailed(
|
||||
title: __('Payment has failed'),
|
||||
paymentHistory: $paymentHistory,
|
||||
bankBranch: $bankBranch,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -239,7 +241,7 @@ class OnlinePaymentRepository
|
||||
|
||||
return $this->paymentCheckResponseTemplate(
|
||||
success: true,
|
||||
pnr: $paymentHistory->orderNumber,
|
||||
pnr: $paymentHistory->online_paymantable_id,
|
||||
branch_name: $bankBranch->name,
|
||||
price_amount: $paymentHistory->amount.' TMT'
|
||||
);
|
||||
@@ -248,12 +250,19 @@ class OnlinePaymentRepository
|
||||
/**
|
||||
* Failed payment
|
||||
*/
|
||||
public function paymentFailed(string $title = '', $paymentHistory = null): array
|
||||
public function paymentFailed(string $title = '', $paymentHistory = null, $bankBranch = null): array
|
||||
{
|
||||
if ($paymentHistory) {
|
||||
$paymentHistory->update([
|
||||
'paymentStatus' => OnlinePaymentRepository::FAILED,
|
||||
]);
|
||||
|
||||
return $this->paymentCheckResponseTemplate(
|
||||
success: false,
|
||||
pnr: $paymentHistory->online_paymantable_id,
|
||||
branch_name: $bankBranch->name,
|
||||
price_amount: $paymentHistory->amount.' TMT'
|
||||
);
|
||||
}
|
||||
|
||||
return $this->paymentCheckResponseTemplate(false, $title);
|
||||
|
||||
Reference in New Issue
Block a user