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
Afficher le fichier Open project: sonata-project/ecommerce

Protected Properties

Свойство Type Description
$router Symfony\Component\Routing\RouterInterface
$translator Symfony\Component\Translation\TranslatorInterface
$webConnectorProvider Object that manages http client.

Méthodes publiques

Méthode 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 méthode

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 méthode

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

checkPaypalFiles() public méthode

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

encryptViaBuffer() public méthode

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

encryptViaFile() public méthode

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

getOrderReference() public méthode

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

getPaymentStatusList() public static méthode

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

getWebConnectorProvider() public méthode

public getWebConnectorProvider ( ) : unknown
Résultat unknown $webConnectorProvider

isRequestValid() public méthode

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

setWebConnectorProvider() public méthode

public setWebConnectorProvider ( unknown $webConnectorProvider )
$webConnectorProvider unknown

Property Details

$router protected_oe property

protected RouterInterface,Symfony\Component\Routing $router
Résultat Symfony\Component\Routing\RouterInterface

$translator protected_oe property

protected TranslatorInterface,Symfony\Component\Translation $translator
Résultat Symfony\Component\Translation\TranslatorInterface

$webConnectorProvider protected_oe property

Object that manages http client.
protected $webConnectorProvider