A fluent interface for interacting with Netopia's services.

Overview

@patrasq/dev-tools

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'))
You might also like...
Create executable strings using a fluent API.

command-builder A PHP class to build executable with using fluent API. Summary About Features Installation Examples Compatibility table Tests About I

Skosmos is a web-based tool providing services for accessing controlled vocabularies, which are used by indexers describing documents and searchers looking for suitable keywords.

Skosmos is a web-based tool providing services for accessing controlled vocabularies, which are used by indexers describing documents and searchers looking for suitable keywords.

A PHP library to convert text to speech using various services

speaker A PHP library to convert text to speech using various services

MajorDoMo is an open-source DIY smarthome automation platform aimed to be used in multi-protocol and multi-services environment.
MajorDoMo is an open-source DIY smarthome automation platform aimed to be used in multi-protocol and multi-services environment.

MajorDoMo (Major Domestic Module) is an open-source DIY smarthome automation platform aimed to be used in multi-protocol and multi-services environment. It is based on web-technologies stack and ready to be delivered to any modern device. It is very flexible in configuration with OOP paradigm used to set up automation rules and scripts. This platform can be installed on almost any personal computer running Windows or Linux OS.

Redmine API services
Redmine API services

DevMakerLab/My-Mine Want to track and analyze your Redmine tickets/projects, Installation Examples Installation ⚠️ Requires = PHP 7.4 ⚠️ composer req

Simple repository pattern for laravel, with services!

With repository and service you can separate business logic and query logic, slim controller and DRY. Simple generate repository and service with artisan command, automatically bind interface with repository

Prepare your Laravel apps incredibly fast, with various commands, services, facades and boilerplates.

Grafite Builder Grafite has archived this project and no longer supports or develops the code. We recommend using only as a source of ideas for your o

A collection of samples that demonstrate how to call Google Cloud services from PHP.

PHP Docs Samples A collection of samples that demonstrate how to call Google Cloud services from PHP. See our other Google Cloud Platform github repos

A collection of samples that demonstrate how to call Google Cloud services from PHP.

PHP Docs Samples A collection of samples that demonstrate how to call Google Cloud services from PHP. See our other Google Cloud Platform github repos

Releases(v0.0.14-alpha)
  • v0.0.14-alpha(Oct 30, 2022)

    What's Changed

    • Dev/payment fix by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/24

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.13-alpha...v0.0.14-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.13-alpha(Oct 21, 2022)

    What's Changed

    • Fixed exception raised by SOAP payment. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/22
    • Added environment variable for route prefix. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/23

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.12-alpha...v0.0.13-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.12-alpha(Oct 14, 2022)

    What's Changed

    • Fixed middleware for IPN endpoint. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/21

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.11-alpha...v0.0.12-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.11-alpha(Oct 14, 2022)

    What's Changed

    • Removed payment from success route. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/20

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.10-alpha...v0.0.11-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.10-alpha(Oct 14, 2022)

    What's Changed

    • Dev/config by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/19

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.9-alpha...v0.0.10-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.9-alpha(Oct 10, 2022)

    What's Changed

    • PaymentMethod deletion no longer fully deletes payment. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/18

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.8-alpha...v0.0.9-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.8-alpha(Oct 10, 2022)

    What's Changed

    • Soap payments now use the payment method details as result. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/17

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.7-alpha...v0.0.8-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.7-alpha(Oct 10, 2022)

    What's Changed

    • Payment method is now always saved, regardless of previous status. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/16

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.6-alpha...v0.0.7-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.6-alpha(Oct 10, 2022)

    What's Changed

    • Payment method is now always saved, regardless of previous status. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/15

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.5-alpha...v0.0.6-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.5-alpha(Oct 10, 2022)

    What's Changed

    • Fixed payment usedCard relationship. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/14

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.4-alpha...v0.0.5-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.4-alpha(Oct 10, 2022)

    What's Changed

    • Fixed netopia_payment_cards migration. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/13

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.3-alpha...v0.0.4-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.3-alpha(Oct 10, 2022)

    What's Changed

    • Update README.md by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/11
    • Payment card details by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/12

    Full Changelog: https://github.com/Codestagero/laravel-netopia/compare/v0.0.2-alpha...v0.0.3-alpha

    Source code(tar.gz)
    Source code(zip)
  • v0.0.2-alpha(Oct 10, 2022)

    What's Changed

    • Added metadata items to payments. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/1
    • Dev/saved payment methods by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/6
    • Updated the payment metadata accessor. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/7
    • Updated the way the payment status change event is fired. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/8
    • Fixed he way masked card is passed in the default payment service. by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/9
    • Dev/soap by @iRealWorlds in https://github.com/Codestagero/laravel-netopia/pull/10

    Full Changelog: https://github.com/Codestagero/laravel-netopia/commits/v0.0.2-alpha

    Source code(tar.gz)
    Source code(zip)
Owner
Codestage
🏆 Internationally awarded web software company based in Bucharest, Romania.
Codestage
A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface

A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface.

smpl 9 Sep 1, 2022
Strings Package provide a fluent, object-oriented interface for working with multibyte string

Strings Package provide a fluent, object-oriented interface for working with multibyte string, allowing you to chain multiple string operations together using a more readable syntax compared to traditional PHP strings functions.

Glowy PHP 14 Mar 12, 2022
This package provides a simple and intuitive way to work on the Youtube Data API. It provides fluent interface to Youtube features.

Laravel Youtube Client This package provides a simple and intuitive way to work on the Youtube Data API. It provides fluent interface to Youtube featu

Tilson Mateus 6 May 31, 2023
Some Joomla! 4.x Web Services Api Examples and Experiments to raise the level of awareness of the huge potiental of Joomla! 4.x Web Services.

j4x-api-examples WHY? If you are a Joomla! developer or want to become a Joomla! developer there is a new resource for you The Official New Joomla! Ma

Mr Alexandre ELISÉ 11 Nov 29, 2022
A simple package for interacting with the exchangerate.host API

Table of Contents Overview Installation Usage Methods Exchange Rate Getting the Rate Between Two Currencies Getting the Rate Between More Than Two Cur

Ash Allen 23 Feb 16, 2022
PHP library for interacting with the Waves blockchain.

Waves-PHP PHP client library for interacting with Waves blockchain platform. Installation composer require waves/client Usage See example.php for full

Waves Protocol 4 Sep 30, 2022
🎮 A simple command line tool for installing and interacting with your leaf apps

Leaf CLI 2 A simple command line tool for creating and interacting with your leaf projects. You can do stuff like installing packages, interacting wit

Leaf Framework 7 Aug 24, 2022
Fluent regular expressions in PHP

FLUX (Fluent Regex) 0.5.2 by Selvin Ortiz Description Fluent Regular Expressions in PHP inspired by and largely based on VerbalExpressions:JS by Jesse

Selvin Ortiz 341 Nov 20, 2022
Enable method chaining or fluent expressions for any value and method.

PHP Pipe Operator A (hopefully) temporary solution to implement the pipe operator in PHP. Table of contents Requirements How to install How to use The

Sebastiaan Luca 268 Dec 26, 2022
The package provides an expressive "fluent" way to define model attributes.

The package provides an expressive "fluent" way to define model attributes. It automatically builds casts at the runtime and adds a native autocompletion to the models' properties.

Boris Lepikhin 506 Dec 28, 2022