2017 © Pedro Peláez
 

library mobilni-platby

Dispatcher for Mobile Payments (www.mobilniplatby.cz) for Nette Framework.

image

minetro/mobilni-platby

Dispatcher for Mobile Payments (www.mobilniplatby.cz) for Nette Framework.

  • Thursday, June 23, 2016
  • by f3l1x
  • Repository
  • 8 Watchers
  • 5 Stars
  • 11,566 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

, (*1)

, (*2)

Website 🚀 contributte.org | Contact 👨🏻‍💻 f3l1x.io | Twitter 🐦 @contributte , (*3)

Disclaimer

:warning: This project is no longer being maintained.
Composer contributte/mobilni-platby
Version
PHP
License

Usage

composer require contributte/mobilni-platby

Versions

State Version Branch PHP
dev ^0.2 master >= 7.1
stable ^0.1 master >= 7.1

Usage

Custom dispatcher

<?php declare(strict_types = 1);

namespace Your\App;

use Contributte\MobilniPlatby\IDispatcher;
use Contributte\MobilniPlatby\Request\AbstractRequest;
use Contributte\MobilniPlatby\Response\AbstractResponse;
use Contributte\MobilniPlatby\Response\Response;

class TestDispatcher implements IDispatcher
{

    public function dispatch(AbstractRequest $request): AbstractResponse
    {
        return new Response('This is super!');
    }

}

Example presenter

<?php declare(strict_types = 1);

namespace Your\App\Presenters;

use Contributte\MobilniPlatby\Dispatcher\CallbackDispatcher;
use Contributte\MobilniPlatby\Request\ConfirmRequest;
use Contributte\MobilniPlatby\Request\RequestFactory;
use Contributte\MobilniPlatby\Request\SmsRequest;
use Contributte\MobilniPlatby\Response\AbstractResponse;
use Contributte\MobilniPlatby\Response\ConfirmResponse;
use Contributte\MobilniPlatby\Response\Response;
use Nette\Application\UI\Presenter;

class SmsPresenter extends Presenter
{

    public function actionSms1(): void
    {
        $requestFactory = new RequestFactory($this->getHttpRequest());

        $dispatcher = new TestDispatcher();

        $this->sendResponse($dispatcher->dispatch($requestFactory->create()));
    }

    public function actionSms2(): void
    {
        $requestFactory = new RequestFactory($this->getHttpRequest());

        $dispatcher = new CallbackDispatcher();

        $dispatcher->registerSmsCallback(function (SmsRequest $request, Response $response): AbstractResponse {
            return new Response('My response!');
        });

        $dispatcher->registerConfirmCallback(function (ConfirmRequest $request, ConfirmResponse $response) {
            return new ConfirmResponse();
        });
        $this->sendResponse($dispatcher->dispatch($requestFactory->create()));
    }

}

Development

This package was maintain by these authors., (*4)

, (*5)


Consider to support contributte development team. Also thank you for using this package., (*6)

The Versions

23/06 2016

dev-master

9999999-dev https://github.com/minetro/mobilni-platby

Dispatcher for Mobile Payments (www.mobilniplatby.cz) for Nette Framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

07/03 2015

1.0.1

1.0.1.0 https://github.com/minetro/mobilni-platby

Dispatcher for Mobile Payments (www.mobilniplatby.cz) for Nette Framework.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

13/01 2015

1.0.0

1.0.0.0 http://github.com/f3l1x/Mobilni-platby

Dispatcher for Mobile Payments (www.mobilniplatby.cz) for Nette Framework.

  Sources   Download

MIT

The Requires

 

The Development Requires