<?php
$menues = App\Models\Admin\SetupPage::where('status',true)->get();
?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start Header
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<header class="header-section position-sticky">
<div class="header">
<div class="header-bottom-area">
<div class="container custom-container">
<div class="header-menu-content">
<nav class="navbar navbar-expand-xl p-0">
<a class="site-logo site-title" href="<?php echo e(setRoute('frontend.index')); ?>"><img src="<?php echo e(get_logo($basic_settings)); ?>" alt="site-logo"></a>
<button class="navbar-toggler ms-auto" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="fas fa-bars"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav main-menu me-auto">
<li class="nav-item dropdown"><a href="javascript:void(0);" class="has-sub"><?php echo e(__("Personal")); ?> <i class="fas fa-angle-down"></i></a>
<ul class="sub-menu">
<li>
<a href="<?php echo e(setRoute('frontend.save.card')); ?>"><?php echo e(__("Save Cards")); ?></a>
</li>
<li>
<a href="<?php echo e(setRoute('frontend.transfer.money')); ?>"><?php echo e(__("Transfer Money")); ?></a>
</li>
<li>
<a href="<?php echo e(setRoute('frontend.payment.system')); ?>"><?php echo e(__("Payments")); ?></a>
</li>
</ul>
</li>
<li class="nav-item dropdown"><a href="javascript:void(0);" class="has-sub"><?php echo e(__("Business")); ?> <i class="fas fa-angle-down"></i></a>
<ul class="sub-menu">
<li>
<a href="<?php echo e(setRoute('frontend.accept.payment')); ?>"><?php echo e(__("Accept Payments")); ?></a>
</li>
</ul>
</li>
<li class="nav-item dropdown"><a href="javascript:void(0);" class="has-sub"><?php echo e(__("Company")); ?> <i class="fas fa-angle-down"></i></a>
<ul class="sub-menu">
<li>
<a href="<?php echo e(setRoute('frontend.about')); ?>"><?php echo e(__("About Us")); ?></a>
</li>
<li>
<a href="<?php echo e(setRoute('frontend.web.journal')); ?>"><?php echo e(__("Blog")); ?></a>
</li>
<li>
<a href="<?php echo e(setRoute('frontend.service')); ?>"><?php echo e(__("Services")); ?></a>
</li>
</ul>
</li>
<li class="nav-item dropdown">
<a href="<?php echo e(setRoute('frontend.developer.index')); ?>" class="has-sub"><?php echo e(__("Developer")); ?></a>
</li>
</ul>
<div class="navbar-right">
<ul>
<li class="nav-item">
<a href="<?php echo e(setRoute('frontend.contact')); ?>" class="help-btn"><?php echo e(__("Help")); ?></a>
</li>
</ul>
<div class="header-action">
<div class="language-select">
<?php
$__current_local = session("local") ?? get_default_language_code();
?>
<select class="nice-select" name="lang_switcher" id="">
<?php $__currentLoopData = $__languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $__item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($__item->code); ?>" <?php if($__current_local == $__item->code): ?>
<?php if(true): echo 'selected'; endif; ?>
<?php endif; ?>><?php echo e($__item->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
</div>
<div class="header-action">
<?php if(auth()->guard()->check()): ?>
<a href="<?php echo e(setRoute('user.dashboard')); ?>" class="btn--base active"><?php echo e(__("Dashboard")); ?></a>
<?php else: ?>
<a href="<?php echo e(setRoute('user.login')); ?>" class="btn--base active"><?php echo e(__("Log In")); ?></a>
<a href="<?php echo e(setRoute('user.register')); ?>" class="btn--base"><?php echo e(__("Sign Up")); ?></a>
<?php endif; ?>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
</header>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
End Header
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<?php $__env->startPush('script'); ?>
<script>
$("select[name=lang_switcher]").change(function(){
var selected_value = $(this).val();
var submitForm = `<form action="<?php echo e(setRoute('frontend.languages.switch')); ?>" id="local_submit" method="POST"> <?php echo csrf_field(); ?> <input type="hidden" name="target" value="${$(this).val()}" ></form>`;
$("body").append(submitForm);
$("#local_submit").submit();
});
</script>
<?php $__env->stopPush(); ?><?php /**PATH /home/kueuepay/public_html/resources/views/frontend/partials/header.blade.php ENDPATH**/ ?>
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"
}