sergiotropea / nexi-bundle
Sistema di Pagamento con Nexi
Installs: 46
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^5.3.3 || ^7.0
- symfony/framework-bundle: ~2.7|~3.3|~4.0|~5.0
- twig/twig: ~1.26|~2.0
Requires (Dev)
- phpunit/phpunit: ^4.8.35|^5.4.3|^6.0
- symfony/phpunit-bridge: ~2.7|~3.3|~4.0
This package is not auto-updated.
Last update: 2024-05-15 19:54:04 UTC
README
Bundle to include Nexi Payment System, you can find service and routes set, ready to use for button - response - abort - post.
You can override DefaultController to improve and grow up new functionality.
Below eh bundle Structure
- Controller
- DefaltController.php
- Entity
- Nexi.php
- Resouces
- views
- Default
- abort.html.twig
- index.html.twig
- response.html.twig
- Default
- views
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require sergiotropea/nexi-bundle dev-master
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new SergioTropea\NexiBundle\SergioTropeaNexiBundle(), ); // ... } // ... }
Step 3: Routing
Insert into routing file the prefix of any route
// app/config/routing.yml // ... nexi: resource: "@SergioTropeaNexiBundle/Resources/config/routing.yml"
Step 4: Config
Insert into routing file the prefix of any route
// app/config/config.yml // ... sergio_tropea_nexi: environment: test #test or production url: <url_base> alias: <alias> key: <key>
Step 4: How to generate Url
Insert into routing file the prefix of any route
// src/AppBundle/Controller/DefaultController.php // ... $nexiService = $this->get('sergio_tropea_nexi.nexi'); //Mandatory $nexi = new Nexi(); $nexi->setCodTrans("TEST_".time()); $nexi->setDivisa("EUR"); $nexi->setImporto(1200); //Optional dump($nexiService->generateUrl($nexi));