PHP Класс Sonata\Component\Payment\PaymentHandler

Responsible for interactions between PaymentController & Model
Автор: Hugo Briand ([email protected])
Наследование: implements Sonata\Component\Payment\PaymentHandlerInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$notificationBackend Sonata\NotificationBundle\Backend\BackendInterface
$orderManager Sonata\Component\Order\OrderManagerInterface
$paymentSelector Sonata\Component\Payment\PaymentSelectorInterface
$referenceGenerator Sonata\Component\Generator\ReferenceInterface
$transactionManager TransactionManagerInterface

Открытые методы

Метод Описание
__construct ( Sonata\Component\Order\OrderManagerInterface $orderManager, Sonata\Component\Payment\PaymentSelectorInterface $paymentSelector, Sonata\Component\Generator\ReferenceInterface $referenceGenerator, TransactionManagerInterface $transactionManager, Sonata\NotificationBundle\Backend\BackendInterface $notificationBackend, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher ) Constructor.
getPaymentCallbackResponse ( Request $request )
getSendbankOrder ( Sonata\Component\Basket\BasketInterface $basket )
handleConfirmation ( Request $request )
handleError ( Request $request, Sonata\Component\Basket\BasketInterface $basket )

Защищенные методы

Метод Описание
createTransaction ( Request $request ) : Sonata\Component\Payment\TransactionInterface
getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
getPayment ( $code ) : Sonata\Component\Payment\PaymentInterface
getValidOrder ( Sonata\Component\Payment\TransactionInterface $transaction ) : Sonata\Component\Order\OrderInterface Retrieves the order matching $transaction and adds it to $transaction.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Sonata\Component\Order\OrderManagerInterface $orderManager, Sonata\Component\Payment\PaymentSelectorInterface $paymentSelector, Sonata\Component\Generator\ReferenceInterface $referenceGenerator, TransactionManagerInterface $transactionManager, Sonata\NotificationBundle\Backend\BackendInterface $notificationBackend, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
$orderManager Sonata\Component\Order\OrderManagerInterface
$paymentSelector Sonata\Component\Payment\PaymentSelectorInterface
$referenceGenerator Sonata\Component\Generator\ReferenceInterface
$transactionManager TransactionManagerInterface
$notificationBackend Sonata\NotificationBundle\Backend\BackendInterface
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface

createTransaction() защищенный Метод

protected createTransaction ( Request $request ) : Sonata\Component\Payment\TransactionInterface
$request Symfony\Component\HttpFoundation\Request
Результат Sonata\Component\Payment\TransactionInterface

getEventDispatcher() защищенный Метод

protected getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
Результат Symfony\Component\EventDispatcher\EventDispatcherInterface

getPayment() защищенный Метод

protected getPayment ( $code ) : Sonata\Component\Payment\PaymentInterface
$code
Результат Sonata\Component\Payment\PaymentInterface

getPaymentCallbackResponse() публичный Метод

public getPaymentCallbackResponse ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getSendbankOrder() публичный Метод

public getSendbankOrder ( Sonata\Component\Basket\BasketInterface $basket )
$basket Sonata\Component\Basket\BasketInterface

getValidOrder() защищенный Метод

Retrieves the order matching $transaction and adds it to $transaction.
protected getValidOrder ( Sonata\Component\Payment\TransactionInterface $transaction ) : Sonata\Component\Order\OrderInterface
$transaction Sonata\Component\Payment\TransactionInterface The request's transaction (will be linked to the order in the process)
Результат Sonata\Component\Order\OrderInterface

handleConfirmation() публичный Метод

public handleConfirmation ( Request $request )
$request Symfony\Component\HttpFoundation\Request

handleError() публичный Метод

public handleError ( Request $request, Sonata\Component\Basket\BasketInterface $basket )
$request Symfony\Component\HttpFoundation\Request
$basket Sonata\Component\Basket\BasketInterface

Описание свойств

$eventDispatcher защищенное свойство

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventDispatcher
Результат Symfony\Component\EventDispatcher\EventDispatcherInterface

$notificationBackend защищенное свойство

protected BackendInterface,Sonata\NotificationBundle\Backend $notificationBackend
Результат Sonata\NotificationBundle\Backend\BackendInterface

$orderManager защищенное свойство

protected OrderManagerInterface,Sonata\Component\Order $orderManager
Результат Sonata\Component\Order\OrderManagerInterface

$paymentSelector защищенное свойство

protected PaymentSelectorInterface,Sonata\Component\Payment $paymentSelector
Результат Sonata\Component\Payment\PaymentSelectorInterface

$referenceGenerator защищенное свойство

protected ReferenceInterface,Sonata\Component\Generator $referenceGenerator
Результат Sonata\Component\Generator\ReferenceInterface

$transactionManager защищенное свойство

protected TransactionManagerInterface $transactionManager
Результат TransactionManagerInterface