/home/kueuepay/public_html/storage/framework/views/630b58859bd2a959bc63655bd153e5f38c165c58.php
<?php
    $current_route = Route::currentRouteName();
?>
<?php if(isset($group_links) && is_array($group_links)): ?>

    <?php
        $collect_routes = [];
        $d_routes = data_get($group_links,"dropdown.*.links.*.route") ?? [];
        $l_routes = data_get($group_links,"links.*.route") ?? [];
        $n_routes = data_get($group_links,"*.route") ?? [];
        $collect_routes = array_merge($collect_routes,$d_routes,$l_routes,$n_routes);
        $t_access_permission = admin_permission_by_name_array($collect_routes);
    ?>

    <?php if($t_access_permission === true): ?>
        <li class="sidebar-menu-header"><?php echo e(__($group_title ?? "")); ?></li>
    <?php endif; ?>

    <?php $__currentLoopData = $group_links ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $group_item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

        <?php if($key == "dropdown"): ?>
            <?php
                $dropdown_items = [];
            ?>
            <?php $__currentLoopData = $group_item; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php if(isset($item['links']) && count($item['links']) > 0): ?>
                    <?php
                        $routes = Arr::pluck($item['links'],"route");
                        $access_permission = admin_permission_by_name_array($routes);
                        if($access_permission == true) {

                            $dropdown_items[] = [
                                'title'     => $item['title'],
                                'links'     => $item['links'],
                                'routes'    => $routes,
                                'icon'      => $item['icon'] ?? "",
                            ];
                        }
                    ?>
                <?php endif; ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

            <?php $__currentLoopData = $dropdown_items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li class="sidebar-menu-item sidebar-dropdown <?php if(in_array($current_route,$item['routes'])): ?> active <?php endif; ?>">
                    <a href="javascript:void(0)">
                        <i class="<?php echo e($item['icon'] ?? ""); ?>"></i>
                        <span class="menu-title"><?php echo e(__($item['title'] ?? "")); ?></span>
                    </a>
                    <ul class="sidebar-submenu">
                        <li class="sidebar-menu-item">
                            <?php $__currentLoopData = $item['links']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $nav_item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php echo $__env->make('admin.components.side-nav.dropdown-link',[
                                    'title'         => $nav_item['title'],
                                    'route'         => $nav_item['route'],
                                ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </li>
                    </ul>
                </li>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php elseif($key == "links"): ?>
            <?php $__currentLoopData = $group_item; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $link): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                    $access_permission = admin_permission_by_name($link['route']);
                ?>

                <?php if(isset($access_permission) && $access_permission === true): ?>
                    <?php echo $__env->make('admin.components.side-nav.link',[
                        'title'     => $link['title'],
                        'route'     => $link['route'],
                        'icon'      => $link['icon'],
                    ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php endif; ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php else: ?>
            <?php
                $access_permission = admin_permission_by_name($group_item['route']);
            ?>

            <?php if(isset($access_permission) && $access_permission === true): ?>
                <?php echo $__env->make('admin.components.side-nav.link',[
                    'title'     => $group_item['title'],
                    'route'     => $group_item['route'],
                    'icon'      => $group_item['icon'],
                ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <?php endif; ?>   
        <?php endif; ?>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

<?php endif; ?><?php /**PATH /home/kueuepay/public_html/resources/views/admin/components/side-nav/link-group.blade.php ENDPATH**/ ?>
Initiate Payment

Initiate Payment

Initiates a new payment transaction.

Endpoint: POST create-order
Parameter Type Details
amount decimal Your Amount , Must be rounded at 2 precision.
currency string Currency Code, Must be in Upper Case (Alpha-3 code)
success_url string Enter your return or success URL
cancel_url string (optional) Enter your cancel or failed URL
                    
                        Request Example (guzzle)
                        

<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', $base_url.'create-order', [
'headers' => [
  'Authorization' => 'Bearer '. $authorizationToken,
  'accept' => 'application/json',
  'content-type' => 'application/json',
 ],
'form_params' => [
  'amount' => '$amount',
  'currency' => 'currency',
  'success_url' => 'success_url',
  'cancel_url' => 'cancel_url',
 ],
]);
echo $response->getBody();
                    
                        
**Response: SUCCESS (200 OK)**
{
 "message": {
 "success": [
  "Order created successfully."
 ]
},
"data": {
 "redirect_url":"https://example.com/login/OISADFDFSDFSF",
 "order_details":{
 "amount" : "10",
 "fixed_charge" : 2,
 "percent_charge" : 1,
 "total_charge" : 3,
 "total_payable" : 13,
 "currency" : "USD",
 "expiry_time": "2024-04-25T06:48:35.984285Z",
 "success_url": "http://127.0.0.1/nfcpay/user/transaction/success",
 "cancel_url": "http://127.0.0.1/nfcpay/user/transaction/cancel"
}
},
"type": "success"
}
                    
                        
**Response: ERROR (400 FAILED)**
{
 "message": {
 "error": [
  "Invalid token."
 ]
},
"data": null,
"type": "error"
}