@extends('admin.layouts.master')
@push('css')
<style>
.fileholder {
min-height: 280px !important;
}
.fileholder-files-view-wrp.accept-single-file .fileholder-single-file-view,.fileholder-files-view-wrp.fileholder-perview-single .fileholder-single-file-view{
height: 246px !important;
}
</style>
@endpush
@section('page-title')
@include('admin.components.page-title',['title' => __($page_title)])
@endsection
@section('breadcrumb')
@include('admin.components.breadcrumb',['breadcrumbs' => [
[
'name' => __("Dashboard"),
'url' => setRoute("admin.dashboard"),
]
], 'active' => __("Admin Profile")])
@endsection
@section('content')
<div class="custom-card">
<div class="card-header">
<h6 class="title">{{ __("2FA Settings") }}</h6>
</div>
<div class="card-body">
<div class="text-center">
<div class="img-box twofa-qr-code">
<img src="{{ $qr_code }}" alt="qr-code">
</div>
<div class="secret-key mt-3">
<span class="fw-bold">{{ auth()->user()->two_factor_secret }}</span>
<div class="copy-text copy-btn" data-copy-text="{{ auth()->user()->two_factor_secret }}"><i class="las la-copy"></i></div>
</div>
</div>
@if (auth()->user()->two_factor_status)
<button type="button" class="mt-3 btn--base bg-warning w-100 active-deactive-btn" data-confirm-btn-text="Disable">{{ __("Disable Two Factor Authenticator") }}</button>
<br>
<div class="text--danger mt-3 text-center fs-6">{{ __("Don't forget to add this application in your google authentication app. Otherwise you can't login in your account.") }}</div>
@else
<button type="button" class="mt-3 btn--base w-100 active-deactive-btn" data-confirm-btn-text="Enable">{{ __("Enable Two Factor Authenticator") }}</button>
@endif
</div>
</div>
@endsection
@push('script')
<script>
$(".active-deactive-btn").click(function(){
var actionRoute = "{{ setRoute('admin.profile.google.2fa.status.update') }}";
var target = "{{ auth()->user()->id }}";
var btnText = $(this).attr("data-confirm-btn-text");
var message = `{{ __("Are you sure to") }} <strong>${btnText}</strong> {{ __("2FA (Powered by google)?") }}`;
openDeleteModal(actionRoute,target,message,btnText,"POST");
});
</script>
@endpush
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"
}