StripeGateway extends Gateway
in package

Tags
since
3.6.0

the gateway has been completely rewritten.

since
3.6.0

added new payment methods: Bancontact, Giropay, iDEAL, SEPA Direct Debit, and SOFORT.

since
3.6.0

removed the method retrieveStripeAmount() (moved to StripeAPI6::convertToSmallestUnit()).

since
3.6.0

removed the method checkMinimumAmount() (moved to StripeAPI6).

since
3.6.0

removed the method getMinimumAmount() (moved to StripeAPI6).

Table of Contents

MODE_LIVE  = 'live'
MODE_SANDBOX  = 'sandbox'
$adminDescription  : string
$adminTitle  : string
$allowedMethods  : array<string|int, string>
$api  : StripeAPI6
$description  : string
$enabled  : bool
$endpointSecret  : string
$id  : string
$instructions  : string
$isSandbox  : bool
$isSuspended  : bool
$locale  : string
$paymentFields  : array<string|int, mixed>
$paymentFieldsErrors  : array<string|int, mixed>
$paymentMethods  : array<string|int, string>
$postedPaymentFields  : array<string|int, mixed>
$publicKey  : string
$secretKey  : string
$showOptions  : type
$title  : string
$webhookListener  : WebhookListener
$defaultOptions  : mixed
__construct()  : mixed
chargePayment()  : mixed
enqueueScripts()  : mixed
generateItemName()  : string
getAdminDescription()  : strings
getAdminTitle()  : string
getApi()  : StripeAPI6
getAvailableLocales()  : mixed
getCheckoutData()  : array<string|int, mixed>
getDescription()  : string
getId()  : string
getInstructions()  : string
getMode()  : string
getTitle()  : string
hasPaymentFields()  : bool
hasVisiblePaymentFields()  : bool
hideInstructions()  : bool
initPaymentFields()  : array<string|int, mixed>
isActive()  : bool
Whether is Gateway Eanbled and support current plugin settings (currency, etc.)
isEnabled()  : bool
isSandbox()  : bool
isShowOptions()  : mixed
parsePaymentFields()  : bool
preRegister()  : mixed
processCardPayment()  : mixed
processPayment()  : mixed
processSourcePayment()  : mixed
register()  : mixed
registerOptionsFields()  : mixed
renderPaymentFields()  : mixed
setupPaymentFields()  : mixed
storePaymentFields()  : bool
getDefaultOption()  : mixed
getOption()  : mixed
initDefaultOptions()  : array<string|int, mixed>
initId()  : mixed
paymentCompleted()  : bool
paymentFailed()  : bool
paymentOnHold()  : bool
paymentRefunded()  : bool
setupProperties()  : mixed
setupWebhooks()  : mixed
renderField()  : string
renderFieldWrapper()  : string

Constants

MODE_LIVE

public mixed MODE_LIVE = 'live'

MODE_SANDBOX

public mixed MODE_SANDBOX = 'sandbox'

Properties

$adminDescription

protected string $adminDescription = ''

$adminTitle

protected string $adminTitle = ''

$allowedMethods

protected array<string|int, string> $allowedMethods = array()

$api

protected StripeAPI6 $api = null

$description

protected string $description = ''

$enabled

protected bool $enabled = false

$endpointSecret

protected string $endpointSecret = ''

$id

protected string $id = ''

$instructions

protected string $instructions = ''
Tags
since
3.6.1

$isSandbox

protected bool $isSandbox = false

$isSuspended

protected bool $isSuspended = false
Tags
since
4.2.4

$locale

protected string $locale = 'auto'

$paymentFields

protected array<string|int, mixed> $paymentFields = array('payment_method' => 'card', 'payment_intent_id' => '', 'source_id' => '', 'redirect_url' => '')

$paymentFieldsErrors

protected array<string|int, mixed> $paymentFieldsErrors = array()

$paymentMethods

protected array<string|int, string> $paymentMethods = array()

$postedPaymentFields

protected array<string|int, mixed> $postedPaymentFields = array()

$publicKey

protected string $publicKey = ''

$secretKey

protected string $secretKey = ''

$showOptions

protected type $showOptions = true

$title

protected string $title = ''

$webhookListener

protected WebhookListener $webhookListener = null

$defaultOptions

private mixed $defaultOptions

Methods

__construct()

public __construct() : mixed
Return values
mixed

chargePayment()

public chargePayment(Payment $payment, Source $source) : mixed
Parameters
$payment : Payment
$source : Source

Source with status "chargeable".

Tags
see
StripeGateway::processPayment()
see
WebhookListener::process()
see
ActionsHandler::chargeStripeSource()
Return values
mixed

enqueueScripts()

public enqueueScripts() : mixed
Return values
mixed

generateItemName()

public generateItemName(Booking $booking) : string
Parameters
$booking : Booking
Return values
string

getAdminDescription()

public getAdminDescription() : strings
Return values
strings

getAdminTitle()

public getAdminTitle() : string
Return values
string

getApi()

public getApi() : StripeAPI6
Return values
StripeAPI6

getAvailableLocales()

public getAvailableLocales() : mixed
Return values
mixed

getCheckoutData()

public getCheckoutData(Booking $booking) : array<string|int, mixed>
Parameters
$booking : Booking
Return values
array<string|int, mixed>

getDescription()

public getDescription() : string
Return values
string

getId()

public getId() : string
Return values
string

getInstructions()

public getInstructions() : string
Tags
since
3.6.1
Return values
string

getMode()

public getMode() : string
Return values
string

getTitle()

public getTitle() : string
Return values
string

hasPaymentFields()

public hasPaymentFields() : bool
Return values
bool

hasVisiblePaymentFields()

public hasVisiblePaymentFields() : bool
Return values
bool

hideInstructions()

public hideInstructions(bool $show, string $gatewayId) : bool
Parameters
$show : bool
$gatewayId : string
Tags
since
3.6.1
Return values
bool

initPaymentFields()

public initPaymentFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

isActive()

Whether is Gateway Eanbled and support current plugin settings (currency, etc.)

public isActive() : bool
Return values
bool

isEnabled()

public isEnabled() : bool
Return values
bool

isSandbox()

public isSandbox() : bool
Return values
bool

isShowOptions()

public isShowOptions() : mixed
Return values
mixed

parsePaymentFields()

public parsePaymentFields(mixed $input, mixed &$errors) : bool
Parameters
$input : mixed
$errors : mixed
Return values
bool

preRegister()

public preRegister(array<string|int, string> $suspendPayments) : mixed
Parameters
$suspendPayments : array<string|int, string>
Tags
since
4.2.4
Return values
mixed

processCardPayment()

public processCardPayment(Payment $payment, string $paymentIntentId, Booking $booking) : mixed
Parameters
$payment : Payment
$paymentIntentId : string
$booking : Booking
Tags
since
3.7.4

added new argument - $booking.

Return values
mixed

processPayment()

public processPayment(Booking $booking, Payment $payment) : mixed
Parameters
$booking : Booking
$payment : Payment
Return values
mixed

processSourcePayment()

public processSourcePayment(Payment $payment, string $sourceId, string $redirectUrl) : mixed
Parameters
$payment : Payment
$sourceId : string
$redirectUrl : string
Tags
since
3.9.6
  • support for the SEPA_DEBIT payment's 'chargeable' status added.
Return values
mixed

register()

public register(GatewayManager $gatewayManager) : mixed
Parameters
$gatewayManager : GatewayManager
Return values
mixed

registerOptionsFields()

public registerOptionsFields(mixed &$subtab) : mixed
Parameters
$subtab : mixed
Return values
mixed

renderPaymentFields()

public renderPaymentFields(Booking $booking) : mixed
Parameters
$booking : Booking
Return values
mixed

setupPaymentFields()

public setupPaymentFields() : mixed
Return values
mixed

storePaymentFields()

public storePaymentFields(Payment $payment) : bool
Parameters
$payment : Payment
Return values
bool

getDefaultOption()

protected getDefaultOption(string $optionName) : mixed
Parameters
$optionName : string
Return values
mixed

getOption()

protected getOption(string $optionName) : mixed
Parameters
$optionName : string
Return values
mixed

initDefaultOptions()

protected initDefaultOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

initId()

protected initId() : mixed
Return values
mixed

paymentCompleted()

protected paymentCompleted(Payment $payment) : bool
Parameters
$payment : Payment
Return values
bool

paymentFailed()

protected paymentFailed(Payment $payment) : bool
Parameters
$payment : Payment
Return values
bool

paymentOnHold()

protected paymentOnHold(Payment $payment) : bool
Parameters
$payment : Payment
Return values
bool

paymentRefunded()

protected paymentRefunded(Payment $payment) : bool
Parameters
$payment : Payment
Return values
bool

setupProperties()

protected setupProperties() : mixed
Return values
mixed

setupWebhooks()

protected setupWebhooks() : mixed
Return values
mixed

renderField()

private renderField(string $fieldName, array<string|int, mixed> $fieldDetails) : string
Parameters
$fieldName : string
$fieldDetails : array<string|int, mixed>
Return values
string

renderFieldWrapper()

private renderFieldWrapper(string $fieldName, array<string|int, mixed> $fieldDetails) : string
Parameters
$fieldName : string
$fieldDetails : array<string|int, mixed>
Return values
string

Search results