wip
This commit is contained in:
@@ -37,14 +37,21 @@ class CheckOnlinePayment extends Action
|
||||
|
||||
$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 @@ class CheckOnlinePayment extends Action
|
||||
'message' => 'Tölenen',
|
||||
]);
|
||||
}
|
||||
|
||||
return Action::modal('modal', [
|
||||
'message' => 'Tölenmedik',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -116,7 +116,9 @@ class OnlinePaymentHistoryResource extends Resource
|
||||
public function actions(NovaRequest $request)
|
||||
{
|
||||
return [
|
||||
CheckOnlinePayment::make(),
|
||||
CheckOnlinePayment::make()
|
||||
->icon('rss')
|
||||
->sole(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,4 +62,9 @@ class OnlinePaymentHistoryPolicy
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function runAction()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user