/home/kueuepay/public_html/storage/framework/views/2680fc264633f9a4fe7b193531c8d3c1cd4a8bce.php
<?php
    $app_local      = get_default_language_code();
    $default        = App\Constants\LanguageConst::NOT_REMOVABLE;
    $slug           = Illuminate\Support\Str::slug(App\Constants\SiteSectionConst::HOW_ITS_WORK_SECTION);
    $how_it_work    = App\Models\Admin\SiteSections::getData($slug)->first();
?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Start How it works
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<section class="how-it-works pt-80" id="animated-section">
    <div class="container">
        <div class="section-tag">
            <span class="d-flex align-items-center"><p><?php echo e($how_it_work->value->language->$app_local->title ?? $how_it_work->value->language->$default->title ?? ''); ?></p> <i class="las la-cog"></i>
            </span>
            <div class="section-element">
                <img src="<?php echo e(asset('public/frontend')); ?>/images/element/section-element.webp">
            </div>
        </div>
        <div class="how-it-work-wrapper">
            <div class="row">
                <div class="col-xl-8 col-lg-10">
                    <div class="section-title mb-40">
                        <h2 class="title"><?php echo e($how_it_work->value->language->$app_local->heading ?? $how_it_work->value->language->$default->heading ?? ''); ?></h2>
                        <p class="sub-title"><?php echo e($how_it_work->value->language->$app_local->sub_heading ?? $how_it_work->value->language->$default->sub_heading ?? ''); ?></p>
                    </div>
                </div>
            </div>
            <div class="row align-items-center mb-30-none">
                <div class="col-lg-6 mb-30">
                   <div class="section-wrapper">
                    <?php
                        $step = 1;
                    ?>
                    <?php $__currentLoopData = $how_it_work->value->items ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    
                    <div class="how-it-work-item mb-30" data-aos="fade-right" data-aos-duration="1200">
                        <div class="seciral-number">
                            <span><?php echo e($step++); ?></span>
                        </div>
                        <div class="item-content">
                            <h3 class="title"><?php echo e(@$item->language->$app_local->item_title ?? $item->language->$default->item_title ?? ''); ?></h3>
                            <p><?php echo e(@$item->language->$app_local->item_heading ?? $item->language->$default->item_heading ?? ''); ?></p>
                        </div>
                    </div>  
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                   </div>
                </div>
                <div class="col-lg-6 mb-30">
                    <div class="how-its-work-img text-center" data-aos="fade-left" data-aos-duration="1200">
                        <img src="<?php echo e(get_image($how_it_work->value->image ?? '','site-section')); ?>">
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    End How it works
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--><?php /**PATH /home/kueuepay/public_html/resources/views/frontend/section/how-it-work.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"
}