This commit is contained in:
nurmuhammet committed 2024-11-25 19:32:51 +05:00
1 parent 7259cdcb26
commit 9d77e50191
11 files changed
+557 -77

No files matched your search

+6 -4
View File
@@ -4,6 +4,7 @@
use App\Models\Branch\Branch;
use App\Models\Payment\OnlinePaymentHistory;
use App\Repos\Payment\Sber\HandlesSberPeyments;
use App\Repos\Payment\VisaMaster\HandlesVisaMasterPayments;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
@@ -13,6 +14,7 @@
class OnlinePaymentRepo
{
use HandlesVisaMasterPayments;
use HandlesSberPeyments;
use Makeable;
/**
@@ -182,7 +184,7 @@ protected static function logResourceNotFound(Request $request, OnlinePaymentHis
*
* @return array<string, bool|string>
*/
public static function successfulPaymentResponse($paymentHistory, $bank_branch, $resource): array
public static function successfulPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL): array
{
return [
'success' => true,
@@ -190,7 +192,7 @@ public static function successfulPaymentResponse($paymentHistory, $bank_branch,
'pnr' => $paymentHistory->orderNumber,
'branch_name' => $bank_branch->name,
'price_amount' => convertToOriginalFormat($paymentHistory->amount).' TMT',
'return_url' => url('/work-place/resources/nova-visa-master-payment-orders/'.$resource->visa_master_payment_order_id),
'return_url' => $returnURL,
];
}
@@ -201,7 +203,7 @@ public static function successfulPaymentResponse($paymentHistory, $bank_branch,
* @param $bank_branch
* @param $resource
*/
public static function failedPaymentResponse($paymentHistory, $bank_branch, $resource)
public static function failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL)
{
return [
'success' => false,
@@ -209,7 +211,7 @@ public static function failedPaymentResponse($paymentHistory, $bank_branch, $res
'pnr' => $paymentHistory->orderNumber,
'branch_name' => $bank_branch->name,
'price_amount' => convertToOriginalFormat($paymentHistory->amount).' TMT',
'return_url' => url('/work-place/resources/nova-visa-master-payment-orders/'.$resource->visa_master_payment_order_id),
'return_url' => $returnURL,
];
}