wip
This commit is contained in:
@@ -28,11 +28,12 @@ class CheckOnlinePaymentStatus extends Action
|
||||
* Perform the action on the given models.
|
||||
*
|
||||
* @param \Laravel\Nova\Fields\ActionFields $fields
|
||||
* @param \Illuminate\Support\Collection $models
|
||||
* @param \Illuminate\Support\Collection<array-key, \Illuminate\Database\Eloquent\Model> $models
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(ActionFields $fields, Collection $models)
|
||||
{
|
||||
/** @var \App\Models\Order\Card\CardOrder */
|
||||
$item = $models->first();
|
||||
|
||||
$onlinePaymentResource = OnlinePaymentHistory::query()
|
||||
@@ -58,7 +59,14 @@ class CheckOnlinePaymentStatus extends Action
|
||||
$username = $item->branch->billing_username;
|
||||
$password = $item->branch->billing_password;
|
||||
|
||||
if (($username == '' || $password == '') || (is_null($username) || is_null($password))) {
|
||||
if (is_null($username) || is_null($password)) {
|
||||
return Action::modal('modal-response', [
|
||||
'title' => 'HALKBANK API',
|
||||
'body' => 'Ulanyjy ady bilen açar sözi gabat gelmedi',
|
||||
]);
|
||||
}
|
||||
|
||||
if ($username == '' || $password == '') {
|
||||
return Action::modal('modal-response', [
|
||||
'title' => 'HALKBANK API',
|
||||
'body' => 'Ulanyjy ady bilen açar sözi gabat gelmedi',
|
||||
@@ -82,9 +90,9 @@ class CheckOnlinePaymentStatus extends Action
|
||||
* Get the fields available on the action.
|
||||
*
|
||||
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
|
||||
* @return array
|
||||
* @return array<int, \Laravel\Nova\Fields\Field>
|
||||
*/
|
||||
public function fields(NovaRequest $request)
|
||||
public function fields(NovaRequest $request): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user