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