@if (isset($support_tickets))
<div class="dashboard-area">
<div class="dashboard-item-area">
<div class="row">
<div class="col-xxl-3 col-xl-3 col-lg-6 col-md-6 col-sm-12 mb-15">
<div class="dashbord-item">
<div class="dashboard-content">
<div class="left">
<h6 class="title">{{ __("Pending Tickets") }}</h6>
<div class="user-info">
<h2 class="user-count">{{ $pending_ticket = $support_tickets->where("status",support_ticket_const()::PENDING)->count() }}</h2>
</div>
<div class="user-badge">
<a href="{{ setRoute('admin.support.ticket.pending') }}" class="view-btn bg--warning">{{ __("View All") }}</a>
</div>
</div>
<div class="right">
@php
$percent_count = get_percentage_from_two_number($support_tickets->count(),$pending_ticket);
@endphp
<div class="chart" id="chart6" data-percent="{{ $percent_count }}"><span>{{ $percent_count }}%</span></div>
</div>
</div>
</div>
</div>
<div class="col-xxl-3 col-xl-3 col-lg-6 col-md-6 col-sm-12 mb-15">
<div class="dashbord-item">
<div class="dashboard-content">
<div class="left">
<h6 class="title">{{ __("Active Tickets") }}</h6>
<div class="user-info">
<h2 class="user-count">{{ $active_ticket = $support_tickets->where("status",support_ticket_const()::ACTIVE)->count() }}</h2>
</div>
<div class="user-badge">
<a href="{{ setRoute('admin.support.ticket.active') }}" class="view-btn bg--info">{{ __("View All") }}</a>
</div>
</div>
<div class="right">
@php
$percent_count = get_percentage_from_two_number($support_tickets->count(),$active_ticket);
@endphp
<div class="chart" id="chart7" data-percent="{{ $percent_count }}"><span>{{ $percent_count }}%</span></div>
</div>
</div>
</div>
</div>
<div class="col-xxl-3 col-xl-3 col-lg-6 col-md-6 col-sm-12 mb-15">
<div class="dashbord-item">
<div class="dashboard-content">
<div class="left">
<h6 class="title">{{ __("Solved Tickets") }}</h6>
<div class="user-info">
<h2 class="user-count">{{ $solved_ticket = $support_tickets->where("status",support_ticket_const()::SOLVED)->count() }}</h2>
</div>
<div class="user-badge">
<a href="{{ setRoute('admin.support.ticket.solved') }}" class="view-btn bg--success">{{ __("View All") }}</a>
</div>
</div>
<div class="right">
@php
$percent_count = get_percentage_from_two_number($support_tickets->count(),$solved_ticket);
@endphp
<div class="chart" id="chart8" data-percent="{{ $percent_count }}"><span>{{ $percent_count }}%</span></div>
</div>
</div>
</div>
</div>
<div class="col-xxl-3 col-xl-3 col-lg-6 col-md-6 col-sm-12 mb-15">
<div class="dashbord-item">
<div class="dashboard-content">
<div class="left">
<h6 class="title">{{ __("All Tickets") }}</h6>
<div class="user-info">
<h2 class="user-count">{{ $all_ticket = $support_tickets->count() }}</h2>
</div>
<div class="user-badge">
<a href="{{ setRoute('admin.support.ticket.index') }}" class="view-btn bg--base">{{ __("View All") }}</a>
</div>
</div>
<div class="right">
@php
$percent_count = get_percentage_from_two_number($support_tickets->count(),$all_ticket);
@endphp
<div class="chart" id="chart9" data-percent="{{ $percent_count }}"><span>{{ $percent_count }}%</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endif
Get access token to initiates payment transaction.
generate-token
| Parameter | Type | Comments |
|---|---|---|
| client_id | string | Enter merchant API client/primary key |
| secret_id | string | Enter merchant API secret key |
| env | string | Enter merchant API environment |
| merchant_id | string | Enter merchant API merchant id |
Request Example (guzzle)
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', $base_url. 'v1/generate-token', [
'headers' => [
'accept' => 'application/json',
'content-type' => 'application/json',
],
'form_params' => [
'client_id' => '$client_id',
'secret_id' => 'secret_id',
'env' => 'env',
'merchant_id' => 'merchant_id',
],
]);
echo $response->getBody();
**Response: SUCCESS (200 OK)**
{
"message": {
"success": [
"Successfully token is generated"
]
},
"data": {
"token":"eyJpdiI6InpkczhjTjhQdVhUL2lKQ0pSUUx6aUE9PSIsInZhbHVlIjoiVGVBTVBDTXltbjNZcEIvdEJveGpTSno3TU5NRUtnVkhCZ1pHTFNCUnZGQ2UxMnYxN202cEE1YVRDTEFsc0ZERExoTjdtL0dTL2xoU3QzeUJJOExiMUx5T0w1L0llUXhTUkU1cWVLWEdEbEplb0dKNXcwbTNRM0VxdkUwYzZuNFdtNkhMQ0pRZysyNWkvdzBxSlBoSVBSOGFTekNnR2RXNHVtcG9lMGZOTmNCcm1hR3c5Sk9KTnB4Y3ltZDl6cm90MThrR21Ca3B1azc3bXRiQ0J6SW96UVo1elNkU1ZqeE05bTcwWGp1MEUxWlJFdnNWTmpSbnVpeW92b2U4dXZkUGgyb1VmK0luaGdyaFlsVTZlcVpVRnZlTG1DeFF6Ykk2T2h6Z3JzbnIyNHpNdHowSE5JdDR0Y0pZT20zUm1XYW8iLCJtYWMiOiJlY2M4NGE1OGUzYzkzYzk0YzljNmVmNjE0YWI0ZDIwOGI3NDQ2YWEyY2ZhNzc0NzE4ZmY1ZmYyMz
IyZmQzNDY1IiwidGFnIjoiIn0=",
},
"type": "success"
}
**Response: ERROR (400 FAILED)**
{
"message": {
"error": [
"Invalid credentials."
]
},
"data": null,
"type": "error"
}