codestage / laravel-netopia
A fluent interface for interacting with Netopia's services.
Installs: 369
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 2
pkg:composer/codestage/laravel-netopia
Requires
- ext-soap: *
- doctrine/dbal: ^3.6
- guzzlehttp/guzzle: ^7.5
- illuminate/http: ^10
- illuminate/support: ^10
- netopia/payment: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- mockery/mockery: ^1.5
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-10-19 05:37:05 UTC
README
laravel-netopia
A fluent interface for interacting with Netopia's services.
Info
Database
It'll create a table named netopia_payments with the following configuration:
Schema::create('netopia_payments', function (Blueprint $table): void {
    $table->string('id')->primary();
    $table->string('status')->default(PaymentStatus::NotStarted->value);
    $table->decimal('amount');
    $table->string('currency', 6);
    $table->text('description')->nullable()->default(null);
    $table->nullableMorphs('billable');
    $table->json('shipping_address');
    $table->json('billing_address');
    $table->timestamps();
});
Routes
3 routes will be added, as follows:
| Method | URL | Note | 
|---|---|---|
| GET | /netopia/pay/{payment} | Todo | 
| GET | /netopia/success | Todo | 
| POST | /netopia/ipn | Todo | 
Get started
Paste into your terminal
composer require codestage/laravel-netopia
Configuration
1. Environment variables
Add the following variables to your .env file:
NETOPIA_ENVIRONMENT=
NETOPIA_SIGNATURE=
2. Config file
Create a netopia.php under the app's config directory. It should return an array composed of
| Parameter | Value | Info | 
|---|---|---|
| environment | env('NETOPIA_ENVIRONMENT', 'sandbox') | The environment that Netopia is running in. Valid values are: 'sandbox', 'production' | 
| signature | env('NETOPIA_SIGNATURE') | The merchant signature provided by Netopia. | 
| currency | env('NETOPIA_CURRENCY', 'EUR') | The currency used for Netopia. | 
| certificate_path | array | The paths to the certificate files used for Netopia requests. | 
| certificate_path['public'] | base_path('certificates/' . env('NETOPIA_PUBLIC_FILE', 'netopia.cer')) | |
| certificate_path['secret'] | base_path('certificates/' . env('NETOPIA_PUBLIC_FILE', 'netopia.cer')) |