2017 © Pedro Peláez
 

symfony-bundle nexi-bundle

Sistema di Pagamento con Nexi

image

sergiotropea/nexi-bundle

Sistema di Pagamento con Nexi

  • Tuesday, June 19, 2018
  • by Sergio Tropea
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Overview

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., (*1)

Below eh bundle Structure, (*2)

  • Controller
    • DefaltController.php
  • Entity
    • Nexi.php
  • Resouces
    • views
      • Default
        • abort.html.twig
        • index.html.twig
        • response.html.twig

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:, (*3)

$ 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., (*4)

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:, (*5)

<?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, (*6)

// app/config/routing.yml

// ...
nexi:
    resource: "@SergioTropeaNexiBundle/Resources/config/routing.yml"

Step 4: Config

Insert into routing file the prefix of any route, (*7)

// 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, (*8)

// 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)); 

The Versions

19/06 2018

dev-master

9999999-dev https://github.com/sergiotropea/nexi-bundle.git

Sistema di Pagamento con Nexi

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Sergio Tropea

paypal payment system cartasi nexi sistema di pagamento