interface PurchaseCreditsServiceInterface

Interface to be called for DI for PurchaseCreditsServiceInterface related services

Methods

create()

Creates the PurchaseCredits

Form
createForm(string $name, PurchaseCredits $purchaseCredits, int $credits, array $priceChoices)

Shortcut to call PurchaseCreditsFormFactory to create Form

array
getPrices()

Gets prices for credits

array
getPricesChoice()

Gets prices choice labels for credits

define(PurchaseCredits $purchaseCredits)

Registers the PurchaseCredits

bool
validate(Payment $payment)

Validate the credits purchased

Details

at line 28
PurchaseCredits create()

Creates the PurchaseCredits

Return Value

PurchaseCredits

at line 34
Form createForm(string $name, PurchaseCredits $purchaseCredits, int $credits, array $priceChoices)

Shortcut to call PurchaseCreditsFormFactory to create Form

Parameters

string $name
PurchaseCredits $purchaseCredits
int $credits
array $priceChoices

Return Value

Form

at line 41
array getPrices()

Gets prices for credits

Return Value

array

Exceptions

InvalidArgumentException

at line 47
array getPricesChoice()

Gets prices choice labels for credits

Return Value

array

at line 52
define(PurchaseCredits $purchaseCredits)

Registers the PurchaseCredits

Parameters

PurchaseCredits $purchaseCredits

at line 58
bool validate(Payment $payment)

Validate the credits purchased

Parameters

Payment $payment

Return Value

bool