PHP Класс App\Ninja\PaymentDrivers\BasePaymentDriver

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$accountGateway
$invitation

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

Свойство Тип Описание
$customer
$customerReferenceParam
$customerResponse
$gateway
$gatewayType
$input
$purchaseResponse
$sourceId
$sourceReferenceParam
$tokenResponse
$transactionReferenceParam

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

Метод Описание
__construct ( $accountGateway = false, $invitation = false, $gatewayType = false )
completeOffsitePurchase ( $input )
completeOnsitePurchase ( $input = false, $paymentMethod = false )
createPayment ( $ref = false, $paymentMethod = null )
createPaymentMethod ( $customer )
createToken ( )
createTransactionToken ( ) Some gateways (ie, Checkout.com and Braintree) require generating a token before paying for the invoice
customer ( $clientId = false ) * protected function tokenDetails() { $details = [];
deleteToken ( )
gatewayTypes ( )
handleWebHook ( $input )
handles ( $type )
isGateway ( $gatewayId )
isTwoStep ( ) set payment method as pending until confirmed
isValid ( )
partialView ( ) check if a custom partial exists for this provider
paymentDetailsFromClient ( )
paymentLinks ( )
providerName ( )
refundPayment ( $payment, $amount )
removePaymentMethod ( $paymentMethod )
rules ( )
startPurchase ( $input = false, $sourceId = false )
tokenLinks ( )
tokenize ( ) when set to true we won't pass the card details with the form
verifyBankAccount ( $client, $publicId, $amount1, $amount2 )

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

Метод Описание
account ( )
attemptVoidPayment ( $response, $payment, $amount )
checkCustomerExists ( $customer )
client ( )
contact ( )
createLocalPayment ( $payment )
creatingCustomer ( $customer )
creatingPayment ( $payment, $paymentMethod )
creatingPaymentMethod ( $paymentMethod )
gateway ( )
invoice ( )
isGatewayType ( $gatewayType, $paymentMethod = false ) optionally pass a paymentMethod to determine the type from the token
meetsGatewayTypeLimits ( $gatewayTypeId )
parseCardType ( $cardName )
paymentDetails ( $paymentMethod = false )
paymentUrl ( $gatewayTypeAlias )
paymentView ( ) check if a custom view exists for this provider
refundDetails ( $payment, $amount )
shouldCreateToken ( )

Приватные методы

Метод Описание
paymentDetailsFromInput ( $input )
updateClient ( )

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

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

public __construct ( $accountGateway = false, $invitation = false, $gatewayType = false )

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

protected account ( )

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

protected attemptVoidPayment ( $response, $payment, $amount )

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

protected checkCustomerExists ( $customer )

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

protected client ( )

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

public completeOffsitePurchase ( $input )

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

public completeOnsitePurchase ( $input = false, $paymentMethod = false )

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

protected contact ( )

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

protected createLocalPayment ( $payment )

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

public createPayment ( $ref = false, $paymentMethod = null )

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

public createPaymentMethod ( $customer )

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

public createToken ( )

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

Some gateways (ie, Checkout.com and Braintree) require generating a token before paying for the invoice

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

protected creatingCustomer ( $customer )

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

protected creatingPayment ( $payment, $paymentMethod )

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

protected creatingPaymentMethod ( $paymentMethod )

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

if ($customer = $this->customer()) { $details['customerReference'] = $customer->token; } return $details; }
public customer ( $clientId = false )

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

public deleteToken ( )

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

protected gateway ( )

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

public gatewayTypes ( )

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

public handleWebHook ( $input )

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

public handles ( $type )

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

protected invoice ( )

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

public isGateway ( $gatewayId )

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

optionally pass a paymentMethod to determine the type from the token
protected isGatewayType ( $gatewayType, $paymentMethod = false )

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

set payment method as pending until confirmed
public isTwoStep ( )

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

public isValid ( )

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

protected meetsGatewayTypeLimits ( $gatewayTypeId )

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

protected parseCardType ( $cardName )

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

check if a custom partial exists for this provider
public partialView ( )

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

protected paymentDetails ( $paymentMethod = false )

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

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

protected paymentUrl ( $gatewayTypeAlias )

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

check if a custom view exists for this provider
protected paymentView ( )

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

public providerName ( )

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

protected refundDetails ( $payment, $amount )

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

public refundPayment ( $payment, $amount )

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

public removePaymentMethod ( $paymentMethod )

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

public rules ( )

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

protected shouldCreateToken ( )

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

public startPurchase ( $input = false, $sourceId = false )

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

when set to true we won't pass the card details with the form
public tokenize ( )

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

public verifyBankAccount ( $client, $publicId, $amount1, $amount2 )

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

$accountGateway публичное свойство

public $accountGateway

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

protected $customer

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

protected $customerReferenceParam

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

protected $customerResponse

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

protected $gateway

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

protected $gatewayType

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

protected $input

$invitation публичное свойство

public $invitation

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

protected $purchaseResponse

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

protected $sourceId

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

protected $sourceReferenceParam

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

protected $tokenResponse

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

protected $transactionReferenceParam