namespace App\Services;
use Illuminate\Support\Facades\Http;
class NMI
{
protected $securityKey, $url;
protected $production;
public function __construct()
{
$this->production = env('APP_ENV') === 'production';
$this->securityKey = config('nmi.security_key');
$this->url = 'https://secure.nmi.com/api/transact.php';
}
}
This class initializes with the NMI security key and API URL. It also determines if the application is running in production mode.