PHP Class Paranoia\Payment\Adapter\AdapterAbstract

Afficher le fichier Open project: paranoiaproject/paranoia

Protected Properties

Свойство Type Description
$configuration Paranoia\Configuration\AbstractConfiguration
$currencyCodes array
$dispatcher Symfony\Component\EventDispatcher\EventDispatcher
$transactionMap array

Méthodes publiques

Méthode Description
__construct ( AbstractConfiguration $configuration )
cancel ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
pointQuery ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
pointUsage ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
postAuthorization ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
preAuthorization ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
refund ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
sale ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
setConfiguration ( AbstractConfiguration $configuration )

Méthodes protégées

Méthode Description
buildCancelRequest ( Request $request ) : mixed build request data for cancel transaction.
buildPostAuthorizationRequest ( Request $request ) : mixed build request data for postauthorization transaction.
buildPreAuthorizationRequest ( Request $request ) : mixed build request data for preauthorization transaction.
buildRefundRequest ( Request $request ) : mixed build request data for refund transaction.
buildRequest ( Request $request, string $requestBuilder ) : mixed build complete raw data for the specified request.
buildSaleRequest ( Request $request ) : mixed build request data for sale transaction.
formatAmount ( string | float $amount, boolean $reverse = false ) : string returns formatted amount with doth or without doth.
formatCurrency ( string $currency ) : integer formats the specified string currency code by iso currency codes.
formatExpireDate ( integer $month, integer $year ) : string formats expire date as month/year
formatInstallment ( integer $installment ) : string returns formatted installment amount
formatOrderId ( $orderId ) : mixed returns formatted order number.
getDispatcher ( ) : EventDispatcher
getProviderTransactionType ( string $transactionType ) : string returns transaction code by expected provider.
maskRequest ( string $rawRequest ) : string mask some critical information in transaction request.
parseResponse ( string $rawResponse, string $transactionType ) : Paranoia\Payment\Response\PaymentResponse parses response from returned provider.
sendRequest ( string $url, mixed $data, array $options = null ) : mixed Makes http request to remote host.

Method Details

__construct() public méthode

public __construct ( AbstractConfiguration $configuration )
$configuration Paranoia\Configuration\AbstractConfiguration

buildCancelRequest() abstract protected méthode

build request data for cancel transaction.
abstract protected buildCancelRequest ( Request $request ) : mixed
$request Paranoia\Payment\Request
Résultat mixed

buildPostAuthorizationRequest() abstract protected méthode

build request data for postauthorization transaction.
abstract protected buildPostAuthorizationRequest ( Request $request ) : mixed
$request Paranoia\Payment\Request
Résultat mixed

buildPreAuthorizationRequest() abstract protected méthode

build request data for preauthorization transaction.
abstract protected buildPreAuthorizationRequest ( Request $request ) : mixed
$request Paranoia\Payment\Request
Résultat mixed

buildRefundRequest() abstract protected méthode

build request data for refund transaction.
abstract protected buildRefundRequest ( Request $request ) : mixed
$request Paranoia\Payment\Request
Résultat mixed

buildRequest() abstract protected méthode

build complete raw data for the specified request.
abstract protected buildRequest ( Request $request, string $requestBuilder ) : mixed
$request Paranoia\Payment\Request
$requestBuilder string
Résultat mixed

buildSaleRequest() abstract protected méthode

build request data for sale transaction.
abstract protected buildSaleRequest ( Request $request ) : mixed
$request Paranoia\Payment\Request
Résultat mixed

cancel() public méthode

public cancel ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
$request Paranoia\Payment\Request
Résultat Paranoia\Payment\Response\PaymentResponse

formatAmount() protected méthode

formatted number returns amount default without doth.
protected formatAmount ( string | float $amount, boolean $reverse = false ) : string
$amount string | float
$reverse boolean
Résultat string

formatCurrency() protected méthode

formats the specified string currency code by iso currency codes.
protected formatCurrency ( string $currency ) : integer
$currency string
Résultat integer

formatExpireDate() protected méthode

formats expire date as month/year
protected formatExpireDate ( integer $month, integer $year ) : string
$month integer
$year integer
Résultat string

formatInstallment() protected méthode

returns formatted installment amount
protected formatInstallment ( integer $installment ) : string
$installment integer
Résultat string

formatOrderId() protected méthode

returns formatted order number.
protected formatOrderId ( $orderId ) : mixed
$orderId
Résultat mixed

getDispatcher() protected méthode

protected getDispatcher ( ) : EventDispatcher
Résultat Symfony\Component\EventDispatcher\EventDispatcher

getProviderTransactionType() protected méthode

returns transaction code by expected provider.
protected getProviderTransactionType ( string $transactionType ) : string
$transactionType string
Résultat string

maskRequest() protected méthode

mask some critical information in transaction request.
protected maskRequest ( string $rawRequest ) : string
$rawRequest string
Résultat string

parseResponse() abstract protected méthode

parses response from returned provider.
abstract protected parseResponse ( string $rawResponse, string $transactionType ) : Paranoia\Payment\Response\PaymentResponse
$rawResponse string
$transactionType string
Résultat Paranoia\Payment\Response\PaymentResponse

pointQuery() public méthode

public pointQuery ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
$request Paranoia\Payment\Request
Résultat Paranoia\Payment\Response\PaymentResponse

pointUsage() public méthode

public pointUsage ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
$request Paranoia\Payment\Request
Résultat Paranoia\Payment\Response\PaymentResponse

postAuthorization() public méthode

public postAuthorization ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
$request Paranoia\Payment\Request
Résultat Paranoia\Payment\Response\PaymentResponse

preAuthorization() public méthode

public preAuthorization ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
$request Paranoia\Payment\Request
Résultat Paranoia\Payment\Response\PaymentResponse

refund() public méthode

public refund ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
$request Paranoia\Payment\Request
Résultat Paranoia\Payment\Response\PaymentResponse

sale() public méthode

public sale ( Request $request ) : Paranoia\Payment\Response\PaymentResponse
$request Paranoia\Payment\Request
Résultat Paranoia\Payment\Response\PaymentResponse

sendRequest() protected méthode

Makes http request to remote host.
protected sendRequest ( string $url, mixed $data, array $options = null ) : mixed
$url string
$data mixed
$options array
Résultat mixed

setConfiguration() public méthode

public setConfiguration ( AbstractConfiguration $configuration )
$configuration Paranoia\Configuration\AbstractConfiguration

Property Details

$configuration protected_oe property

protected AbstractConfiguration,Paranoia\Configuration $configuration
Résultat Paranoia\Configuration\AbstractConfiguration

$currencyCodes protected_oe property

protected array $currencyCodes
Résultat array

$dispatcher protected_oe property

protected EventDispatcher,Symfony\Component\EventDispatcher $dispatcher
Résultat Symfony\Component\EventDispatcher\EventDispatcher

$transactionMap protected_oe property

protected array $transactionMap
Résultat array