Skip to content

Commit

Permalink
wallet resource class added
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Dec 20, 2023
1 parent c7daef3 commit 093746a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Http/Controllers/WalletVerificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Fintech\Core\Traits\ApiResponseTrait;
use Fintech\Remit\Http\Requests\WalletVerificationRequest;
use Fintech\Remit\Http\Resources\WalletVerificationResource;
use Illuminate\Routing\Controller;

class WalletVerificationController extends Controller
Expand All @@ -13,7 +14,7 @@ class WalletVerificationController extends Controller
/**
* Handle the incoming request.
*/
public function __invoke(WalletVerificationRequest $request)
public function __invoke(WalletVerificationRequest $request): \Illuminate\Http\JsonResponse|WalletVerificationResource
{

try {
Expand All @@ -23,14 +24,12 @@ public function __invoke(WalletVerificationRequest $request)
}

$data = [
'data' => [
'name' => 'Bkash',
'account_title' => 'MT TECHNOLOGIES LTD',
'account_no' => $request->input('wallet_no', '01689553434'),
],
'name' => 'Bkash',
'account_title' => 'MT TECHNOLOGIES LTD',
'account_no' => $request->input('wallet_no', '01689553434'),
];

return $this->success($data);
return new WalletVerificationResource($data);

} catch (\Exception $exception) {

Expand Down

0 comments on commit 093746a

Please sign in to comment.