BraintreeGateway
extends Gateway
in package
Table of Contents
- MODE_LIVE = 'live'
- MODE_SANDBOX = 'sandbox'
- $adminDescription : string
- $adminTitle : string
- $description : string
- $enabled : bool
- $id : string
- $instructions : string
- $isSandbox : bool
- $isSuspended : bool
- $paymentFields : array<string|int, mixed>
- $paymentFieldsErrors : array<string|int, mixed>
- $postedPaymentFields : array<string|int, mixed>
- $showOptions : type
- $title : string
- $webhookListener : WebhookListener
- $accountId : string
- $apiIssues : string
- $defaultOptions : mixed
- $merchantId : string
- $paymentMethodNonce : string
- $privateKey : string
- $publicKey : string
- $supportedCurrencies : array<string|int, mixed>
- __construct() : mixed
- enqueueScripts() : mixed
- generateItemName() : string
- getAdminDescription() : strings
- getAdminTitle() : string
- 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
- isSupportCurrency() : bool
- parsePaymentFields() : bool
- preRegister() : mixed
- processPayment() : bool
- register() : mixed
- registerOptionsFields() : mixed
- renderPaymentFields() : mixed
- setupPaymentFields() : mixed
- setupSuppportedCurrencies() : mixed
- storePaymentFields() : bool
- generatePaymentRequest() : array<string|int, mixed>
- Generate the request for the payment.
- getDefaultOption() : mixed
- getOption() : mixed
- initDefaultOptions() : array<string|int, mixed>
- initId() : mixed
- paymentCompleted() : bool
- paymentFailed() : bool
- paymentOnHold() : bool
- paymentRefunded() : bool
- setupNotificationListener() : mixed
- setupProperties() : mixed
- checkAPI() : mixed
- generateAdminDescription() : mixed
- loadBraintreeApi() : mixed
- renderField() : string
- renderFieldWrapper() : string
- setupAPI() : mixed
Constants
MODE_LIVE
public
mixed
MODE_LIVE
= 'live'
MODE_SANDBOX
public
mixed
MODE_SANDBOX
= 'sandbox'
Properties
$adminDescription
protected
string
$adminDescription
= ''
$adminTitle
protected
string
$adminTitle
= ''
$description
protected
string
$description
= ''
$enabled
protected
bool
$enabled
= false
$id
protected
string
$id
= ''
$instructions
protected
string
$instructions
= ''
Tags
$isSandbox
protected
bool
$isSandbox
= false
$isSuspended
protected
bool
$isSuspended
= false
Tags
$paymentFields
protected
array<string|int, mixed>
$paymentFields
$paymentFieldsErrors
protected
array<string|int, mixed>
$paymentFieldsErrors
= array()
$postedPaymentFields
protected
array<string|int, mixed>
$postedPaymentFields
= array()
$showOptions
protected
type
$showOptions
= true
$title
protected
string
$title
= ''
$webhookListener
protected
WebhookListener
$webhookListener
$accountId
private
string
$accountId
$apiIssues
private
string
$apiIssues
= ''
$defaultOptions
private
mixed
$defaultOptions
$merchantId
private
string
$merchantId
$paymentMethodNonce
private
string
$paymentMethodNonce
$privateKey
private
string
$privateKey
$publicKey
private
string
$publicKey
$supportedCurrencies
private
array<string|int, mixed>
$supportedCurrencies
= array()
Methods
__construct()
public
__construct() : mixed
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 —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
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
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 —isSupportCurrency()
public
isSupportCurrency(string $currency) : bool
Parameters
- $currency : string
-
Currency code.
Return values
bool —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
Return values
mixed —processPayment()
public
processPayment(Booking $booking, Payment $payment) : bool
Parameters
Return values
bool —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 —setupSuppportedCurrencies()
public
setupSuppportedCurrencies() : mixed
Return values
mixed —storePaymentFields()
public
storePaymentFields(Payment $payment) : bool
Parameters
- $payment : Payment
Return values
bool —generatePaymentRequest()
Generate the request for the payment.
protected
generatePaymentRequest(string $nonce, string $accountId, Payment $payment) : array<string|int, mixed>
Parameters
- $nonce : string
- $accountId : string
- $payment : Payment
Return values
array<string|int, mixed> —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 —setupNotificationListener()
protected
setupNotificationListener() : mixed
Return values
mixed —setupProperties()
protected
setupProperties() : mixed
Return values
mixed —checkAPI()
private
checkAPI() : mixed
Return values
mixed —generateAdminDescription()
private
generateAdminDescription() : mixed
Return values
mixed —loadBraintreeApi()
private
loadBraintreeApi() : 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 —setupAPI()
private
setupAPI() : mixed