PHP Class Sonata\Component\Payment\BasePaypal

Paypal Encryption https://www.paypal.com/IntegrationCenter/ic_button-encryption.html#Createanencryptedbutton openssl genrsa -out my-prvkey.pem 1024 openssl req -new -key my-prvkey.pem -x509 -days 365 -out my-pubcert.pem *
Author: Thomas Rabaix ([email protected])
Inheritance: extends BasePayment
Show file Open project: sonata-project/ecommerce

Protected Properties

Property Type Description
$router Symfony\Component\Routing\RouterInterface
$translator Symfony\Component\Translation\TranslatorInterface
$webConnectorProvider Object that manages http client.

Public Methods

Method Description
__construct ( Symfony\Component\Routing\RouterInterface $router, Symfony\Component\Translation\TranslatorInterface $translator = null )
applyTransactionId ( Sonata\Component\Payment\TransactionInterface $transaction ) return the transaction_id sent by the bank.
checkPaypalFiles ( ) Check openssl configuration, throw an RuntimeException if something is wrong.
encryptViaBuffer ( $hash ) : string Encrypt paypal information using openssl with a buffer.
encryptViaFile ( $hash ) : string Encrypt paypal information using openssl with a temporary file.
getOrderReference ( Sonata\Component\Payment\TransactionInterface $transaction ) : string return the order reference from the transaction object.
getPaymentStatusList ( ) : array return the status list available from paypal system.
getWebConnectorProvider ( ) : unknown
isRequestValid ( Sonata\Component\Payment\TransactionInterface $transaction ) : boolean return true if the request contains a valid check parameter.
setWebConnectorProvider ( unknown $webConnectorProvider )

Method Details

__construct() public method

public __construct ( Symfony\Component\Routing\RouterInterface $router, Symfony\Component\Translation\TranslatorInterface $translator = null )
$router Symfony\Component\Routing\RouterInterface
$translator Symfony\Component\Translation\TranslatorInterface

applyTransactionId() public method

return the transaction_id sent by the bank.
public applyTransactionId ( Sonata\Component\Payment\TransactionInterface $transaction )
$transaction Sonata\Component\Payment\TransactionInterface

checkPaypalFiles() public method

Check openssl configuration, throw an RuntimeException if something is wrong.
public checkPaypalFiles ( )

encryptViaBuffer() public method

Encrypt paypal information using openssl with a buffer.
public encryptViaBuffer ( $hash ) : string
$hash
return string the encrypted data

encryptViaFile() public method

Encrypt paypal information using openssl with a temporary file.
public encryptViaFile ( $hash ) : string
$hash
return string the encrypted data

getOrderReference() public method

return the order reference from the transaction object.
public getOrderReference ( Sonata\Component\Payment\TransactionInterface $transaction ) : string
$transaction Sonata\Component\Payment\TransactionInterface
return string

getPaymentStatusList() public static method

return the status list available from paypal system.
public static getPaymentStatusList ( ) : array
return array

getWebConnectorProvider() public method

public getWebConnectorProvider ( ) : unknown
return unknown $webConnectorProvider

isRequestValid() public method

return true if the request contains a valid check parameter.
public isRequestValid ( Sonata\Component\Payment\TransactionInterface $transaction ) : boolean
$transaction Sonata\Component\Payment\TransactionInterface
return boolean

setWebConnectorProvider() public method

public setWebConnectorProvider ( unknown $webConnectorProvider )
$webConnectorProvider unknown

Property Details

$router protected property

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

$translator protected property

protected TranslatorInterface,Symfony\Component\Translation $translator
return Symfony\Component\Translation\TranslatorInterface

$webConnectorProvider protected property

Object that manages http client.
protected $webConnectorProvider