<?php
namespace Torann\GeoIP;
use ArrayAccess;
use Illuminate\Support\Str;
use Illuminate\Support\Arr;
/**
* Class Location
*
* @property string|null $ip
* @property string|null $iso_code
* @property string|null $country
* @property string|null $city
* @property string|null $state
* @property string|null $state_name
* @property string|null $postal_code
* @property float|null $lat
* @property float|null $lon
* @property string|null $timezone
* @property string|null $continent
* @property string|null $currency
* @property bool $default
* @property bool $cached
*
* @package Torann\GeoIP
*/
class Location implements ArrayAccess
{
/**
* The location's attributes
*
* @var array
*/
protected $attributes = [];
/**
* Create a new location instance.
*
* @param array $attributes
*/
public function __construct(array $attributes = [])
{
$this->attributes = $attributes;
}
/**
* Determine if the location is for the same IP address.
*
* @param string $ip
*
* @return bool
*/
public function same($ip)
{
return $this->getAttribute('ip') == $ip;
}
/**
* Set a given attribute on the location.
*
* @param string $key
* @param mixed $value
*
* @return $this
*/
public function setAttribute($key, $value)
{
$this->attributes[$key] = $value;
return $this;
}
/**
* Get an attribute from the $attributes array.
*
* @param string $key
*
* @return mixed
*/
public function getAttribute($key)
{
$value = Arr::get($this->attributes, $key);
// First we will check for the presence of a mutator for the set operation
// which simply lets the developers tweak the attribute as it is set.
if (method_exists($this, 'get' . Str::studly($key) . 'Attribute')) {
$method = 'get' . Str::studly($key) . 'Attribute';
return $this->{$method}($value);
}
return $value;
}
/**
* Return the display name of the location.
*
* @return string
*/
public function getDisplayNameAttribute()
{
return preg_replace('/^,\s/', '', "{$this->city}, {$this->state}");
}
/**
* Is the location the default.
*
* @return bool
*/
public function getDefaultAttribute($value)
{
return is_null($value) ? false : $value;
}
/**
* Get the instance as an array.
*
* @return array
*/
public function toArray()
{
return $this->attributes;
}
/**
* Get the location's attribute
*
* @param string $key
*
* @return mixed
*/
public function __get($key)
{
return $this->getAttribute($key);
}
/**
* Set the location's attribute
*
* @param string $key
* @param mixed $value
*/
public function __set($key, $value)
{
$this->setAttribute($key, $value);
}
/**
* Determine if the given attribute exists.
*
* @param mixed $offset
*
* @return bool
*/
public function offsetExists(mixed $offset): bool
{
return isset($this->$offset);
}
/**
* Get the value for a given offset.
*
* @param mixed $offset
*
* @return mixed
*/
public function offsetGet(mixed $offset): mixed
{
return $this->$offset;
}
/**
* Set the value for a given offset.
*
* @param mixed $offset
* @param mixed $value
*
* @return void
*/
public function offsetSet(mixed $offset, mixed $value): void
{
$this->$offset = $value;
}
/**
* Unset the value for a given offset.
*
* @param mixed $offset
*
* @return void
*/
public function offsetUnset(mixed $offset): void
{
unset($this->$offset);
}
/**
* Check if the location's attribute is set
*
* @param $key
*
* @return bool
*/
public function __isset($key)
{
return array_key_exists($key, $this->attributes);
}
/**
* Unset an attribute on the location.
*
* @param string $key
*
* @return void
*/
public function __unset($key)
{
unset($this->attributes[$key]);
}
}
The Kueue Pay Payment Gateway is an innovative technology that facilitates seamless and secure transactions between merchants and their customers. It enables businesses to accept debit and credit card payments both online and in physical stores.
The Kueue Pay Payment Gateway acts as a bridge between a merchant’s website or point-of-sale system and the payment processing network. It securely transmits payment information, authorizes transactions, and provides real-time status updates.
The Kueue Pay Developer API empowers developers and entrepreneurs to integrate the Kueue Pay Payment Gateway directly into their websites or applications. This streamlines the payment process for customers and provides businesses with a customizable and efficient payment solution.
To access the Kueue Pay Developer API, you need to sign up for a developer account on our platform. Once registered, you’ll receive an API key that you can use to authenticate your API requests.
The Kueue Pay Developer API allows you to initiate payments, check the status of payments, and process refunds. You can create a seamless payment experience for your customers while maintaining control over transaction management.
Yes, the Kueue Pay Developer API is designed to accommodate businesses of varying sizes and industries. Whether you’re a small online store or a large enterprise, our API can be tailored to fit your specific payment needs.
The Kueue Pay Developer API is designed with simplicity and ease of use in mind. Our comprehensive documentation, code samples, and developer support resources ensure a smooth integration process for any web platform.
We offer competitive pricing plans for using the Kueue Pay Payment Gateway and Developer API. Details about fees and pricing tiers can be found on our developer portal.
Absolutely, the Kueue Pay Developer API offers customization options that allow you to tailor the payment experience to match your brand and user interface. You can create a seamless and cohesive payment journey for your customers.
We provide dedicated developer support to assist you with any issues or questions you may have during the API integration process. Reach out to our support team at developersupport@NFCPay.com for prompt assistance.
Remember, our goal is to empower your business with a robust and efficient payment solution. If you have any additional questions or concerns, feel free to explore our developer portal or contact our support team.