This commit is contained in:
2024-11-23 12:00:25 +05:00
parent 0b5b1574a5
commit b9348f3343

View File

@@ -171,13 +171,15 @@ class OnlinePaymentRepo
return static::resourceNotFound(); return static::resourceNotFound();
} }
$resource->load('branch'); $bank_branch = $resource->parent->branch;
info($bank_branch);
$response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatus.do', [ $response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatus.do', [
'language' => 'ru', 'language' => 'ru',
'orderId' => $request->orderId, 'orderId' => $request->orderId,
'userName' => $resource->branch->billing_visa_master_username, 'userName' => $bank_branch->billing_visa_master_username,
'password' => $resource->branch->billing_visa_master_password, 'password' => $bank_branch->billing_visa_master_password,
]); ]);
info($response->json()); info($response->json());
@@ -202,9 +204,9 @@ class OnlinePaymentRepo
'success' => $payment_status, 'success' => $payment_status,
'title' => $payment_status ? __('Payment is successful') : __('Payment has failed'), 'title' => $payment_status ? __('Payment is successful') : __('Payment has failed'),
'pnr' => $paymentHistory->orderNumber, 'pnr' => $paymentHistory->orderNumber,
'branch_name' => $resource->branch->name, 'branch_name' => $bank_branch->name,
'price_amount' => $paymentHistory->amount, 'price_amount' => $paymentHistory->amount,
'return_url' => $resource->panelUrl('index'), 'return_url' => url('/work-place/resources/nova-visa-master-payment-orders/' . $resource->visa_master_payment_order_id),
]; ];
} }