PHP Class Sonata\Component\Payment\Ogone\OgonePayment

Author: hbriand ([email protected])
Inheritance: extends Sonata\Component\Payment\BasePayment
Show file Open project: sonata-project/ecommerce Class Usage Examples

Protected Properties

Property Type Description
$router Symfony\Component\Routing\RouterInterface
$templating Symfony\Bundle\FrameworkBundle\Templating\EngineInterface

Public Methods

Method Description
__construct ( Symfony\Component\Routing\RouterInterface $router, Psr\Log\LoggerInterface $logger, Symfony\Bundle\FrameworkBundle\Templating\EngineInterface $templating, boolean $debug ) Constructor.
applyTransactionId ( Sonata\Component\Payment\TransactionInterface $transaction )
encodeString ( $string )
getOrderReference ( Sonata\Component\Payment\TransactionInterface $transaction )
handleError ( Sonata\Component\Payment\TransactionInterface $transaction )
isAddableProduct ( Sonata\Component\Basket\BasketInterface $basket, Sonata\Component\Product\ProductInterface $product )
isBasketValid ( Sonata\Component\Basket\BasketInterface $basket )
isCallbackValid ( Sonata\Component\Payment\TransactionInterface $transaction )
isRequestValid ( Sonata\Component\Payment\TransactionInterface $transaction )
sendConfirmationReceipt ( Sonata\Component\Payment\TransactionInterface $transaction )
sendbank ( Sonata\Component\Order\OrderInterface $order )

Protected Methods

Method Description
compareOrderToParams ( Sonata\Component\Order\OrderInterface $order, array $params ) : boolean Tells if $order matches $params.
generateAbsoluteUrlFromOption ( string $optionKey, Sonata\Component\Order\OrderInterface $order ) Generates absolute URL for route specified in $optionKey and $order.
getAddress ( Sonata\Component\Order\OrderInterface $order ) : string Gets formatted address lines from $order.
getFormParameters ( Sonata\Component\Order\OrderInterface $order ) : array Returns form parameters for sendbank.
getOperation ( ) : string Gets operation from options.
getShaSign ( array $params, boolean $out = false ) : string Signs the payment transaction.

Method Details

__construct() public method

Constructor.
public __construct ( Symfony\Component\Routing\RouterInterface $router, Psr\Log\LoggerInterface $logger, Symfony\Bundle\FrameworkBundle\Templating\EngineInterface $templating, boolean $debug )
$router Symfony\Component\Routing\RouterInterface
$logger Psr\Log\LoggerInterface
$templating Symfony\Bundle\FrameworkBundle\Templating\EngineInterface
$debug boolean

applyTransactionId() public method

public applyTransactionId ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

compareOrderToParams() protected method

Tells if $order matches $params.
protected compareOrderToParams ( Sonata\Component\Order\OrderInterface $order, array $params ) : boolean
$order Sonata\Component\Order\OrderInterface
$params array
return boolean

encodeString() public method

public encodeString ( $string )

generateAbsoluteUrlFromOption() protected method

Generates absolute URL for route specified in $optionKey and $order.
protected generateAbsoluteUrlFromOption ( string $optionKey, Sonata\Component\Order\OrderInterface $order )
$optionKey string
$order Sonata\Component\Order\OrderInterface

getAddress() protected method

Gets formatted address lines from $order.
protected getAddress ( Sonata\Component\Order\OrderInterface $order ) : string
$order Sonata\Component\Order\OrderInterface
return string

getFormParameters() protected method

Returns form parameters for sendbank.
protected getFormParameters ( Sonata\Component\Order\OrderInterface $order ) : array
$order Sonata\Component\Order\OrderInterface
return array

getOperation() protected method

Gets operation from options.
protected getOperation ( ) : string
return string

getOrderReference() public method

public getOrderReference ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

getShaSign() protected method

Signs the payment transaction.
protected getShaSign ( array $params, boolean $out = false ) : string
$params array
$out boolean Should we use the out sha key?
return string

handleError() public method

public handleError ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

isAddableProduct() public method

public isAddableProduct ( Sonata\Component\Basket\BasketInterface $basket, Sonata\Component\Product\ProductInterface $product )
$basket Sonata\Component\Basket\BasketInterface
$product Sonata\Component\Product\ProductInterface

isBasketValid() public method

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

isCallbackValid() public method

public isCallbackValid ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

isRequestValid() public method

public isRequestValid ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

sendConfirmationReceipt() public method

public sendConfirmationReceipt ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

sendbank() public method

public sendbank ( Sonata\Component\Order\OrderInterface $order )
$order Sonata\Component\Order\OrderInterface

Property Details

$router protected property

protected RouterInterface,Symfony\Component\Routing $router
return Symfony\Component\Routing\RouterInterface

$templating protected property

protected EngineInterface,Symfony\Bundle\FrameworkBundle\Templating $templating
return Symfony\Bundle\FrameworkBundle\Templating\EngineInterface