/home/kueuepay/www/storage/framework/views/a7e4299c64cbf8466b8a5d19642a11df0189fc63.php

<?php $__env->startSection('breadcrumb'); ?>
    <?php echo $__env->make('user.components.breadcrumb',['breadcrumbs' => [
        [
            'name'  => __("Dashboard"),
            'url'   => setRoute("user.dashboard"),
        ]
    ], 'active' => __("2FA Security")], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

<div class="body-wrapper">
    <div class="tow-fa-security">
        <div class="row mb-20-none">
            <div class="col-xl-6 col-lg-6 mb-20">
                <div class="two-authentic mt-10">
                    <div class="dashboard-header-wrapper">
                        <h4 class="title"><?php echo e(__("Two Factor Authenticator")); ?></h4>
                    </div>
                    <div class="card-body">
                        <form class="card-form">
                            <div class="row">
                                <div class="col-xl-12 col-lg-12 form-group">
                                    <label><?php echo e(__("Address")); ?><span>*</span></label>
                                    <div class="input-group">
                                        <input type="text" class="form--control" id="referralURL" value="<?php echo e(auth()->user()->two_factor_secret); ?>" readonly>
                                        <div class="input-group-text textCopy"><i class="las la-copy"></i></div>
                                    </div>
                                </div>
                                <div class="col-xl-12 col-lg-12 form-group">
                                    <div class="qr-code-thumb text-center">
                                        <img class="mx-auto" style="width:300px;height:300px" src="<?php echo e($qr_code); ?>">
                                    </div>
                                </div>
                            </div>
                            <div class="col-xl-12 col-lg-12">
                                <?php if(auth()->user()->two_factor_status): ?>
                                    <button type="button" class="btn--base bg--warning w-100 active-deactive-btn"><?php echo e(__("Disable")); ?></button>
                                    <br>
                                    <div class="text--danger mt-3"><?php echo e(__("Don't forget to add this application in your google authentication app. Otherwise you can't login in your account.")); ?></div>
                                <?php else: ?>
                                    <button type="button" class="btn--base w-100 active-deactive-btn"><span class="w-100"><?php echo e(__("Enable")); ?></span></button>
                                <?php endif; ?>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-xl-6 col-lg-6 mb-20">
                <div class="two-authentic mt-10">
                    <div class="dashboard-header-wrapper">
                        <h4 class="title"><?php echo e(__("Google Authenticator")); ?></h4>
                    </div>
                    <div class="card-body">
                        <h4 class="mb-3"><?php echo e(__("Download Google Authenticator App")); ?></h4>
                        <p><?php echo e(__("Google Authenticator adds an extra layer of security to your online accounts by adding a second step of verification when you sign in. This means that in addition to your password, you'll also need to enter a code that is generated by the Google Authenticator app on your phone.")); ?><a
                                href="https://support.google.com/accounts/answer/1066447?hl=en&co=GENIE.Platform=Android"
                                class="text--base" target="_blank"><?php echo e(__("How to Setup?")); ?></a> </p>
                        <div class="play-store-thumb text-center mb-20">
                            <img class="mx-auto" src="<?php echo e(asset('public/frontend')); ?>/images/element/google-authenticator.webp" alt="img">
                        </div>
                        <div class="2fa-btn pt-3">
                            <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2"
                                class="btn--base mt-10 w-100" target="_blank"><i class="fab fa-google-play ms-1"></i>
                                <?php echo e(__("Download For Android")); ?></a>
                            <a href="https://apps.apple.com/us/app/google-authenticator/id388497605"
                                class="btn--base mt-10 w-100" target="_blank"><i class="fab fa-apple ms-1"></i> <?php echo e(__("Download For IOS")); ?></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>
<?php $__env->startPush('script'); ?>
    <script>
        $(".active-deactive-btn").click(function(){
            var actionRoute =  "<?php echo e(setRoute('user.security.google.2fa.status.update')); ?>";
            var target      = 1;
            var btnText = $(this).text();
            var message     = `<?php echo e(__("Are you sure to")); ?> <strong>${btnText}</strong> <?php echo e(__("2 factor authentication (Powered by google)?")); ?>`;
            openAlertModal(actionRoute,target,message,btnText,"POST");
        });

        // copy text
        $('.textCopy').on('click',function(){
            var copyText = document.getElementById("referralURL");
            copyText.select();
            copyText.setSelectionRange(0, 99999);
            document.execCommand("copy");

            throwMessage('success',["Copied: " + copyText.value]);
        });
    </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('user.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\xampp\htdocs\git\nfcpay\resources\views/user/sections/two-fa-security/index.blade.php ENDPATH**/ ?>
Access Token

Get Access Token

Get access token to initiates payment transaction.

Endpoint: POST 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
Just request to that endpoint with all parameter listed below:
                    
                        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":"eyJpdiI6InpkczhjTjhQdVhUL2lKQ0pSUUx6aUE9P
SIsInZhbHVlIjoiVGVBTVBDTXltbjNZcEIvdEJveGpTSno3TU5NRUtn
VkhCZ1pHTFNCUnZGQ2UxMnYxN202cEE1YVRDTEFsc0ZERExoTjdtL0dTL2x
oU3QzeUJJOExiMUx5T0w1L0llUXhTUkU1cWVLWEdEbEplb0dKNXcwbTNRM0
VxdkUwYzZuNFdtNkhMQ0pRZysyNWkvdzBxSlBoSVBSOGFTekNnR2RXNHVtc
G9lMGZOTmNCcm1hR3c5Sk9KTnB4Y3ltZDl6cm90MThrR21Ca3B1azc3bXRi
Q0J6SW96UVo1elNkU1ZqeE05bTcwWGp1MEUxWlJFdnNWTmpSbnVpeW92b2U
4dXZkUGgyb1VmK0luaGdyaFlsVTZlcVpVRnZlTG1DeFF6Ykk2T2h6Z3Jzbn
IyNHpNdHowSE5JdDR0Y0pZT20zUm1XYW8iLCJtYWMiOiJlY2M4NGE1OGUzYz
kzYzk0YzljNmVmNjE0YWI0ZDIwOGI3NDQ2YWEyY2ZhNzc0NzE4ZmY1ZmYyMz
IyZmQzNDY1IiwidGFnIjoiIn0=",
},
"type": "success"
}
                    
                        
**Response: ERROR (400 FAILED)**
{
 "message": {
 "error": [
  "Invalid credentials."
 ]
},
"data": null,
"type": "error"
}