<?php $__env->startPush('css'); ?>
<?php $__env->stopPush(); ?>
<?php $__env->startSection('page-title'); ?>
<?php echo $__env->make('admin.components.page-title',['title' => __($page_title)], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('breadcrumb'); ?>
<?php echo $__env->make('admin.components.breadcrumb',['breadcrumbs' => [
[
'name' => __("Dashboard"),
'url' => setRoute("admin.dashboard"),
]
], 'active' => __("Languages")], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="table-area">
<div class="table-wrapper">
<?php echo $__env->renderUnless($languages->where("status",1)->count(),'admin.components.alerts.warning',['message' => __("There is no default language in your system. System will automatically select English as a default language.")], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path'])); ?>
<div class="table-header">
<h5 class="title"><?php echo e(__($page_title)); ?></h5>
<div class="table-btn-area">
<?php echo $__env->make('admin.components.link.add-default',[
'href' => "#language-add",
'class' => "py-2 px-4 modal-btn",
'text' => __("Add New"),
'permission' => "admin.languages.store",
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin.components.link.custom',[
'href' => "#language-import",
'class' => "btn--base py-2 px-4 bg--info modal-btn",
'icon' => "fas fa-upload me-1",
'text' => __("Import"),
'permission' => "admin.languages.import",
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php if(language_file_exists()): ?>
<?php echo $__env->make('admin.components.link.custom',[
'text' => __("Download"),
'icon' => "fas fa-download me-1",
'permission' => "admin.languages.download",
'href' => setRoute('admin.languages.download'),
'class' => "btn--base py-2 px-4 bg--primary",
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endif; ?>
</div>
</div>
<div class="table-responsive">
<table class="custom-table">
<thead>
<tr>
<th><?php echo e(__("Name")); ?></th>
<th><?php echo e(__("Code")); ?></th>
<th><?php echo e(__("Direction")); ?></th>
<th><?php echo e(__("Status")); ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr data-item="<?php echo e($item->editData); ?>">
<td><?php echo e($item->name); ?></td>
<td><?php echo e($item->code); ?></td>
<td class="text-uppercase"><?php echo e($item->dir); ?></td>
<td>
<?php echo $__env->make('admin.components.form.switcher',[
'name' => 'status',
'value' => $item->status,
'options' => [__('Default') => 1,__('Selectable') => 0],
'onload' => true,
'data_target' => $item->id,
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</td>
<td>
<?php echo $__env->make('admin.components.link.info-default',[
'href' => setRoute('admin.languages.info',$item->code),
'permission' => "admin.languages.info",
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin.components.link.edit-default',[
'class' => "edit-modal-button",
'permission' => "admin.languages.update",
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php if(language_const()::NOT_REMOVABLE != $item->code): ?>
<?php echo $__env->make('admin.components.link.delete-default',[
'class' => "delete-modal-button",
'permission' => "admin.languages.delete",
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<?php echo $__env->make('admin.components.alerts.empty',['colspan' => 4], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
<?php echo $__env->make('admin.components.modals.language.add', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin.components.modals.language.edit', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin.components.modals.language.import',compact("languages"), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('script'); ?>
<script>
$(".delete-modal-button").click(function() {
var oldData = JSON.parse($(this).parents("tr").attr("data-item"));
var actionRoute = "<?php echo e(setRoute('admin.languages.delete')); ?>";
var target = oldData.id;
var message = `<?php echo e(__("Are you sure to delete this language?")); ?>`;
openDeleteModal(actionRoute,target,message);
});
// Switcher
switcherAjax("<?php echo e(setRoute('admin.languages.status.update')); ?>");
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\xampp\htdocs\git\nfcpay\resources\views/admin/sections/language/index.blade.php ENDPATH**/ ?>
Initiates a new payment transaction.
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"
}