Stripe
extends Component
in package
implements
ISingleton
Uses
TSingleton
FinalYes
Tags
Table of Contents
Interfaces
Properties
- $instance : ISingleton
- $hashCode : int
- $hashCounter : int
- $stripe : StripeClient
- $stripe_config : array<string|int, mixed>
Methods
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- __destruct() : mixed
- __get() : mixed
- addBankAccount() : BankAccount
- addCard() : Card
- addCustomer() : string
- addTrialCustomer() : string
- cancelSubscription() : Subscription
- charge() : Charge
- createProduct() : Product
- createSubscription() : Subscription
- deleteCard() : Card
- deleteCustomer() : bool
- extends() : bool
- getCustomer() : Customer|null
- getInstance() : ISingleton
- getProduct() : Product
- getReflection() : ReflectionClass
- refund() : bool
- updateCard() : Card
- init() : mixed
- {@inheritdoc}
- setConfig() : mixed
- validateConfig() : void
Properties
$instance
protected
static ISingleton
$instance
$hashCode
private
int
$hashCode
$hashCounter
private
static int
$hashCounter
= 0
$stripe
private
StripeClient
$stripe
$stripe_config
private
array<string|int, mixed>
$stripe_config
= []
Methods
__call()
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
__construct()
public
__construct() : mixed
__destruct()
public
__destruct() : mixed
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
addBankAccount()
public
addBankAccount(array<string|int, mixed> $data) : BankAccount
Parameters
- $data : array<string|int, mixed>
Tags
Return values
BankAccountaddCard()
public
addCard(ICustomer $wolfgang_stripe_customer, string $stripe_token) : Card
Parameters
- $wolfgang_stripe_customer : ICustomer
- $stripe_token : string
Tags
Return values
CardaddCustomer()
public
addCustomer(array<string|int, mixed> $options) : string
Parameters
- $options : array<string|int, mixed>
Tags
Return values
stringaddTrialCustomer()
public
addTrialCustomer(ICustomer $wolfgang_stripe_customer) : string
Parameters
- $wolfgang_stripe_customer : ICustomer
Return values
stringcancelSubscription()
public
cancelSubscription(string $stripe_subscription_id[, string $comment = '' ][, string $feedback = '' ]) : Subscription
Parameters
- $stripe_subscription_id : string
- $comment : string = ''
- $feedback : string = ''
Tags
Return values
Subscriptioncharge()
public
charge(ICustomer $wolfgang_stripe_customer, array<string|int, mixed> $params) : Charge
Parameters
- $wolfgang_stripe_customer : ICustomer
- $params : array<string|int, mixed>
Tags
Return values
ChargecreateProduct()
public
createProduct(array<string|int, mixed> $options) : Product
Parameters
- $options : array<string|int, mixed>
Tags
Return values
ProductcreateSubscription()
public
createSubscription(ICustomer $stripe_customer, Product $product, IPaymentMethod $payment_method) : Subscription
Parameters
- $stripe_customer : ICustomer
- $product : Product
- $payment_method : IPaymentMethod
Tags
Return values
SubscriptiondeleteCard()
public
deleteCard(ICustomer $wolfgang_stripe_customer, string $stripe_card_id) : Card
Parameters
- $wolfgang_stripe_customer : ICustomer
- $stripe_card_id : string
Tags
Return values
CarddeleteCustomer()
public
deleteCustomer(ICustomer $wolfgang_stripe_customer) : bool
Parameters
- $wolfgang_stripe_customer : ICustomer
Tags
Return values
boolextends()
public
extends(ReflectionClass $reflector) : bool
Parameters
- $reflector : ReflectionClass
Return values
boolgetCustomer()
public
getCustomer(ICustomer $wolfgang_stripe_customer) : Customer|null
Parameters
- $wolfgang_stripe_customer : ICustomer
Tags
Return values
Customer|nullgetInstance()
public
static getInstance() : ISingleton
Return values
ISingletongetProduct()
public
getProduct(string $id) : Product
Parameters
- $id : string
Tags
Return values
ProductgetReflection()
public
getReflection() : ReflectionClass
Return values
ReflectionClassrefund()
public
refund(string $stripe_charge_id[, string $reason = "requested_by_customer" ]) : bool
Parameters
- $stripe_charge_id : string
- $reason : string = "requested_by_customer"
Return values
boolupdateCard()
public
updateCard(ICustomer $wolfgang_stripe_customer, string $stripe_card_id, string $name, int $exp_year, int $exp_month) : Card
Parameters
- $wolfgang_stripe_customer : ICustomer
- $stripe_card_id : string
- $name : string
- $exp_year : int
- $exp_month : int
Tags
Return values
Cardinit()
{@inheritdoc}
protected
init() : mixed
Tags
setConfig()
private
setConfig(array<string|int, mixed> $config) : mixed
Parameters
- $config : array<string|int, mixed>
validateConfig()
private
validateConfig(array<string|int, mixed> $config) : void
Parameters
- $config : array<string|int, mixed>