wip
This commit is contained in:
@@ -37,14 +37,21 @@ class CheckOnlinePayment extends Action
|
|||||||
|
|
||||||
$relatedResource->load('branch');
|
$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') {
|
if ($onlinePaymentResource->api_client == 'billing_username') {
|
||||||
$username = $relatedResource->branch->billing_username;
|
$username = $relatedResource->branch->billing_username;
|
||||||
$password = $relatedResource->branch->billing_password;
|
$password = $relatedResource->branch->billing_password;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($onlinePaymentResource->api_client == 'billing_visa_master_username') {
|
if ($username == '') {
|
||||||
$username = $relatedResource->branch->billing_visa_master_username;
|
return ActionResponse::danger('Ulanyjy ady bn acar sozuni gabat gelmedi');
|
||||||
$password = $relatedResource->branch->billing_visa_master_password;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatus.do', [
|
$response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatus.do', [
|
||||||
@@ -61,6 +68,10 @@ class CheckOnlinePayment extends Action
|
|||||||
'message' => 'Tölenen',
|
'message' => 'Tölenen',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Action::modal('modal', [
|
||||||
|
'message' => 'Tölenmedik',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -116,7 +116,9 @@ class OnlinePaymentHistoryResource extends Resource
|
|||||||
public function actions(NovaRequest $request)
|
public function actions(NovaRequest $request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
CheckOnlinePayment::make(),
|
CheckOnlinePayment::make()
|
||||||
|
->icon('rss')
|
||||||
|
->sole(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,4 +62,9 @@ class OnlinePaymentHistoryPolicy
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function runAction()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user