/home/kueuepay/public_html/storage/framework/views/aaad0e4bf9d18f5eda0acf94228d1e93799faa40.php
<div class="card-data">
    <?php $__empty_1 = true; $__currentLoopData = $cards ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <div class="dashboard-list-item-wrapper">
            <div class="dashboard-list-item sent">
                <div class="dashboard-list-left">
                    <div class="dashboard-list-user-wrapper">
                        <div class="dashboard-list-user-icon">
                            <i class="las la-credit-card"></i>
                        </div>
                        <div class="dashboard-list-user-content">
                            <?php
                                $name           = decrypt($item->name) ?? '';
                                $card_number    = decrypt($item->card_number) ?? '';
                                $card_cvc       = decrypt($item->card_cvc) ?? '';
                                $expiry_date    = decrypt($item->expiry_date) ?? '';
                            ?> 
                            <h5 class="title"><?php echo e($name); ?></h5>
                            <span><?php echo e(__("Card Number")); ?>: ********<?php echo e(substr($card_number, -4)); ?><?php if($item->default == true): ?>
                                (<?php echo e(__("Default")); ?>)
                            <?php endif; ?></span>
                            <span class="date d-block text--danger"><?php echo e(__("Expiry Date")); ?>: <?php echo e($expiry_date); ?> </span>
                        </div>
                    </div>
                </div>
                <div class="dashboard-list-right d-flex align-items-center">
                    <a href="<?php echo e(setRoute('user.card.make.default',$item->slug)); ?>" class="btn btn--base text-white me-1"><i class="fas fa-check-circle"></i></a>
                    <button type="button" class="btn--custom small bg--danger border--danger text-white"
                        data-bs-toggle="modal" data-bs-target="#deleteModal-<?php echo e($item->slug); ?>"><i class="las la-trash-alt"></i></button>
                </div>
            </div>
        </div>
        <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            Start Modal
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
        <div class="modal fade" id="deleteModal-<?php echo e($item->slug); ?>" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header" id="deleteModalLabel">
                        <h4 class="modal-title"><?php echo e(__("Delete Confirmation")); ?></h4>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <div class="modal-body">
                        <div class="row mb-10-none">
                            <div class="col-xl-12 col-lg-12">
                                <h5><?php echo e(__("Are you sure to delete this card?")); ?></h5>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn--base bg--danger border--danger text-white" data-bs-dismiss="modal"><?php echo e(__("Cancel")); ?></button>
                        <form action="<?php echo e(setRoute('user.card.delete',$item->slug)); ?>" method="post">
                            <?php echo csrf_field(); ?>
                            <button type="submit" class="btn--base"><?php echo e(__("Confirm")); ?></button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            End Modal
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
    <div class="alert alert-primary text-center">
        <?php echo e(__("Card not found!")); ?>

    </div>
    <?php endif; ?>
</div>
<?php /**PATH D:\xampp\htdocs\git\nfcpay\resources\views/user/components/card-table/card.blade.php ENDPATH**/ ?>
Initiate Payment

Initiate Payment

Initiates a new payment transaction.

Endpoint: POST 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"
}