Download the PHP package nikolag/core without Composer

On this page you can find all versions of the php package nikolag/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package core

nikolag/core

Core package for building additional payment gateway integrations with nikolag packages and Laravel >=5.5

Installation guide

composer require nikolag/core


Usage

This package contains all of the necessary code to get you started with building the additional integrations of payment gateways with nikolag packages. First of all there are couple of important layers and structure that you must follow:

  1. Configuration file
  2. Main service
  3. Dependency Injections
  4. Migrations and Factories
  5. Facades
  6. Models
  7. Providers
  8. Traits
  9. Tests
  10. Utility classes

1. Configuration file

Configuration file is the most important here since it'll contain all of the required pre-set options of your library. The file must be called nikolag.php and it must be inside of src/config folder.

This is just a starter snippet which u can start adapting to your own library. There are couple of important variables that u gotta change and rules which you must follow. Change {$default} with the name of your package (paypal, payeer, payoneer, ...) and also include the fully qualified name (namespace) of your service instead of {$namespace}. You can check nikolag.php example of how config file should look like. SquareConfig.php is the example of how your configuration class should look like.

2. Main service

Your package must have at least 1 main service which is responsible for all communication between rest calls and your package. It also must extend Nikolag\Core\Abstracts\CorePaymentService and it must implement Nikolag\Core\Contracts\PaymentServiceContract thats explained in the next step. Example of that kind of class can be found SquareService.php.

3. Dependency Injections

Your library must have at least 1 contract which should be named {$serviceName}ServiceContract.php where {$serviceName} is the name of service you are trying to integrate with nikolag packages and Laravel Also it must extends Nikolag\Core\Contracts\PaymentServiceContract. Any other contract which is not connected with your service file in any way mustn't extend the above contract. Some examples of such name are PaypalServiceContract.php, PayeerServiceContract.php, PayoneerServiceContract.php. Example of the contract can be found SquareContract.php.

4. Migrations and Factories

All migrations and factories must be under src/database folder and each of them respectively will have it's own subfolder src/database/factories and src/database/migrations. This core package already has couple of migrations so you don't have to write them yourself, but you can extend on them if necessary.

5. Facades

All facades are found under src/facades and your package must have at least 1 facade which must be alias for your main service class.

6. Models

All models must be located under src/models. There are 2 core models: Customer and Transaction.

You must extend those 2 core models and create your own from them with all relationships available and also add

The above is only required for 2 base models, any other models u might make don't have to extend anything and you can create them normally. Example can be found Customer.php.

7. Providers

You can register multiple providers and they should be named respectively for their role in the library. You can find them under src/providers folder. Here are some examples: ExceptionServiceProvider, MyServiceProvider, ExternalLibrariesProvider, etc..

8. Traits

All traits must be under src/traits.

9. Tests

All your tests must be under tests and they are split into 2 types: integration and unit where each of them has it's own subfolder.

10. Utility classes

All your utility classes must be under src/utils folder.

All available core methods

CoreService

CoreService examples

Get access to the specific underyling driver for any installed payment API

You can also charge the customer with your default driver

You can also list all available drivers

More examples

For a complete example of how to build upon this core package you can take a look at nikolag-core-starter

Contributing

Everyone is welcome to contribute to this repository, simply open up an issue and label the request, whether it is an issue, bug or a feature. For any other enquiries send an email to [email protected]

Contributors

Name Changes Date
@viangela84 Updated order_product table pull request #3 2017-02-07

License

MIT License

Copyright (c) Nikola Gavrić [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/support Version 10.x
illuminate/config Version 10.x
illuminate/console Version 10.x
illuminate/contracts Version 10.x
illuminate/container Version 10.x
illuminate/database Version 10.x
illuminate/filesystem Version 10.x
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nikolag/core contains the following files

Loading the files please wait ....