PHP Class App\Ninja\PaymentDrivers\BasePaymentDriver

Exibir arquivo Open project: hillelcoren/invoice-ninja Class Usage Examples

Public Properties

Property Type Description
$accountGateway
$invitation

Protected Properties

Property Type Description
$customer
$customerReferenceParam
$customerResponse
$gateway
$gatewayType
$input
$purchaseResponse
$sourceId
$sourceReferenceParam
$tokenResponse
$transactionReferenceParam

Public Methods

Method Description
__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 )

Protected Methods

Method Description
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 ( )

Private Methods

Method Description
paymentDetailsFromInput ( $input )
updateClient ( )

Method Details

__construct() public method

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

account() protected method

protected account ( )

attemptVoidPayment() protected method

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

checkCustomerExists() protected method

protected checkCustomerExists ( $customer )

client() protected method

protected client ( )

completeOffsitePurchase() public method

public completeOffsitePurchase ( $input )

completeOnsitePurchase() public method

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

contact() protected method

protected contact ( )

createLocalPayment() protected method

protected createLocalPayment ( $payment )

createPayment() public method

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

createPaymentMethod() public method

public createPaymentMethod ( $customer )

createToken() public method

public createToken ( )

createTransactionToken() public method

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

creatingCustomer() protected method

protected creatingCustomer ( $customer )

creatingPayment() protected method

protected creatingPayment ( $payment, $paymentMethod )

creatingPaymentMethod() protected method

protected creatingPaymentMethod ( $paymentMethod )

customer() public method

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

deleteToken() public method

public deleteToken ( )

gateway() protected method

protected gateway ( )

gatewayTypes() public method

public gatewayTypes ( )

handleWebHook() public method

public handleWebHook ( $input )

handles() public method

public handles ( $type )

invoice() protected method

protected invoice ( )

isGateway() public method

public isGateway ( $gatewayId )

isGatewayType() protected method

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

isTwoStep() public method

set payment method as pending until confirmed
public isTwoStep ( )

isValid() public method

public isValid ( )

meetsGatewayTypeLimits() protected method

protected meetsGatewayTypeLimits ( $gatewayTypeId )

parseCardType() protected method

protected parseCardType ( $cardName )

partialView() public method

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

paymentDetails() protected method

protected paymentDetails ( $paymentMethod = false )

paymentDetailsFromClient() public method

paymentUrl() protected method

protected paymentUrl ( $gatewayTypeAlias )

paymentView() protected method

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

providerName() public method

public providerName ( )

refundDetails() protected method

protected refundDetails ( $payment, $amount )

refundPayment() public method

public refundPayment ( $payment, $amount )

removePaymentMethod() public method

public removePaymentMethod ( $paymentMethod )

rules() public method

public rules ( )

shouldCreateToken() protected method

protected shouldCreateToken ( )

startPurchase() public method

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

tokenize() public method

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

verifyBankAccount() public method

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

Property Details

$accountGateway public_oe property

public $accountGateway

$customer protected_oe property

protected $customer

$customerReferenceParam protected_oe property

protected $customerReferenceParam

$customerResponse protected_oe property

protected $customerResponse

$gateway protected_oe property

protected $gateway

$gatewayType protected_oe property

protected $gatewayType

$input protected_oe property

protected $input

$invitation public_oe property

public $invitation

$purchaseResponse protected_oe property

protected $purchaseResponse

$sourceId protected_oe property

protected $sourceId

$sourceReferenceParam protected_oe property

protected $sourceReferenceParam

$tokenResponse protected_oe property

protected $tokenResponse

$transactionReferenceParam protected_oe property

protected $transactionReferenceParam