<?php
namespace App\Http\Controllers;
use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Models\Admin\Language;
use Jenssegers\Agent\Facades\Agent;
use Illuminate\Support\Facades\Session;
class GlobalController extends Controller
{
/**
* Funtion for get state under a country
* @param country_id
* @return json $state list
*/
public function getStates(Request $request) {
$request->validate([
'country_id' => 'required|integer',
]);
$country_id = $request->country_id;
// Get All States From Country
$country_states = get_country_states($country_id);
return response()->json($country_states,200);
}
public function getCities(Request $request) {
$request->validate([
'state_id' => 'required|integer',
]);
$state_id = $request->state_id;
$state_cities = get_state_cities($state_id);
return response()->json($state_cities,200);
}
public function getCountries(Request $request) {
$countries = get_all_countries();
return response()->json($countries,200);
}
public function getTimezones(Request $request) {
$timeZones = get_all_timezones();
return response()->json($timeZones,200);
}
/**
* Method for language swithch
*/
public function languageSwitch(Request $request) {
$code = $request->target;
$language = Language::where("code",$code)->first();
if(!$language) {
return back()->with(['error' => ['Oops! Language Not Found!']]);
}
Session::put('local',$code);
Session::put('local_dir',$language->dir);
return back()->with(['success' => ['Language Switch to ' . $language->name ]]);
}
/**
* Method for setcookie
*/
public function setCookie(Request $request){
$userAgent = $request->header('User-Agent');
$cookie_status = $request->type;
if($cookie_status == 'allow'){
$response_message = __("Cookie Allowed Success");
$expirationTime = 2147483647; //Maximum Unix timestamp.
}else{
$response_message = __("Cookie Declined");
$expirationTime = Carbon::now()->addHours(24)->timestamp;// Set the expiration time to 24 hours from now.
}
$browser = Agent::browser();
$platform = Agent::platform();
$ipAddress = $request->ip();
return response($response_message)->cookie('approval_status', $cookie_status,$expirationTime)
->cookie('user_agent', $userAgent,$expirationTime)
->cookie('ip_address', $ipAddress,$expirationTime)
->cookie('browser', $browser,$expirationTime)
->cookie('platform', $platform,$expirationTime);
}
}
At NFC Pay, we strive to provide a seamless and satisfactory experience with our services. This Refund Policy outlines the circumstances under which refunds may be issued for transactions made through our platform. Please read this policy carefully to understand your rights regarding refunds.
1. Eligibility for Refunds
Refunds may be considered under the following circumstances:
2. Non-Refundable Situations
Refunds will generally not be issued in the following situations:
3. Refund Process
To request a refund, please follow these steps:
4. Refund Exceptions
Certain transactions may be subject to specific terms and conditions, including non-refundable fees or charges. Please review the terms associated with each transaction carefully, as some fees may not be eligible for refunds.
5. Modifications to the Refund Policy
NFC Pay reserves the right to modify this Refund Policy at any time. Changes will be communicated through updates on our website and app, and the effective date will be updated accordingly. We encourage you to review this policy periodically to stay informed about our refund practices.
By using NFC Pay, you agree to this Refund Policy and understand the terms under which refunds may be issued. Our goal is to ensure a fair and transparent refund process, providing you with confidence and peace of mind when using our services.