This commit is contained in:
nurmuhammet committed 2024-10-14 21:47:19 +05:00
1 parent 42f3e5512b
commit 2f21e78bf3
3 files changed
+22 -4

No files matched your search

+14 -3
View File
@@ -37,14 +37,21 @@ public function handle(ActionFields $fields, Collection $models)
$relatedResource->load('branch');
$username = '';
$password = '';
if ($onlinePaymentResource->api_client == 'billing_visa_master_username') {
$username = $relatedResource->branch->billing_visa_master_username;
$password = $relatedResource->branch->billing_visa_master_password;
}
if ($onlinePaymentResource->api_client == 'billing_username') {
$username = $relatedResource->branch->billing_username;
$password = $relatedResource->branch->billing_password;
}
if ($onlinePaymentResource->api_client == 'billing_visa_master_username') {
$username = $relatedResource->branch->billing_visa_master_username;
$password = $relatedResource->branch->billing_visa_master_password;
if ($username == '') {
return ActionResponse::danger('Ulanyjy ady bn acar sozuni gabat gelmedi');
}
$response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatus.do', [
@@ -61,6 +68,10 @@ public function handle(ActionFields $fields, Collection $models)
'message' => 'Tölenen',
]);
}
return Action::modal('modal', [
'message' => 'Tölenmedik',
]);
}
/**
@@ -116,7 +116,9 @@ public function lenses(NovaRequest $request)
public function actions(NovaRequest $request)
{
return [
CheckOnlinePayment::make(),
CheckOnlinePayment::make()
->icon('rss')
->sole(),
];
}
}