RestCheckoutController
in package
implements
IController
Class RestCheckoutController
Table of Contents
Interfaces
Properties
- $auth : AuthComponent
- $cartService : CartService
- $chargeBeeAddonsRepository : ChargeBeeAddonsRepository
- $chargeBeeComponent : ChargeBeeComponent
- $chargeBeeCouponRepository : ChargeBeeCouponRepository
- $chargeBeePlansRepository : ChargeBeePlansRepository
- $checkoutInvoiceService : CheckoutInvoiceService
- $checkoutStoreService : CheckoutStoreService
- $countryDateGroupRepository : CountryDateGroupRepository
- $countryService : CountryService
- $digitalRegistrationRemoteService : DigitalRegistrationRemoteService
- $entityManager : EntityManager
- $estimator : EstimatorService
- $filter : Filter
- $freemiumCheckService : FreemiumCheckService
- $l : Logger
- $purchasableServices : PurchasableServices|null
- $purchaseRequestArray : array<string|int, mixed>|null
- $redis : Redis
- $request : Request
- $storeAvailabilityService : StoreAvailabilityService
Methods
- __construct() : mixed
- confirmOrderAction() : mixed
- createCartAction() : mixed
- dropCartAction() : mixed
- getCartAction() : mixed
- getFakeAction() : mixed
- getServiceStatusByUserIdAction() : mixed
- getSettingsAction() : array<string|int, mixed>
- listPlansAction() : array<string|int, mixed>
- servicesAction() : PurchasableServices
- addAddonToCart() : mixed
- addCouponsToCart() : mixed
- addOfferToCart() : mixed
- addSubscriptionsToCart() : mixed
- applyOfferToRequest() : mixed
- checkAvailabilityByUserId() : true
- checkUser() : mixed
- createEstimate() : mixed
- createFakeShoppingSession() : ShoppingSession
- createNewShoppingSession() : ShoppingSession
- expireCartWithException() : mixed
- formValidate() : mixed
- getAddonByEntity() : mixed
- getAddonById() : mixed
- getCartAddonByEntity() : mixed
- getCartAddonById() : mixed
- getCartAddons() : mixed
- getClient() : Client
- getCoupons() : mixed
- getCustomer() : Customer
- getOffer() : Offer|null
- getPlanByEntity() : mixed
- getPlanById() : mixed
- getPurchasableServices() : PurchasableServices
- getPurchaseRequestData() : mixed
- getShoppingSession() : ShoppingSession|null
- getSubscriptions() : mixed
- getUserAccount() : UserAccount
- handleRequest() : ShoppingSession
- lockCart() : RedisLock
- lockPurchase() : RedisLock
- populateCartAndEstimate() : mixed
- validateCartContent() : mixed
- validateCartPrices() : mixed
- validateCartTime() : mixed
Properties
$auth
private
AuthComponent
$auth
$cartService
private
CartService
$cartService
$chargeBeeAddonsRepository
private
ChargeBeeAddonsRepository
$chargeBeeAddonsRepository
$chargeBeeComponent
private
ChargeBeeComponent
$chargeBeeComponent
$chargeBeeCouponRepository
private
ChargeBeeCouponRepository
$chargeBeeCouponRepository
$chargeBeePlansRepository
private
ChargeBeePlansRepository
$chargeBeePlansRepository
$checkoutInvoiceService
private
CheckoutInvoiceService
$checkoutInvoiceService
$checkoutStoreService
private
CheckoutStoreService
$checkoutStoreService
$countryDateGroupRepository
private
CountryDateGroupRepository
$countryDateGroupRepository
$countryService
private
CountryService
$countryService
$digitalRegistrationRemoteService
private
DigitalRegistrationRemoteService
$digitalRegistrationRemoteService
$entityManager
private
EntityManager
$entityManager
$estimator
private
EstimatorService
$estimator
$filter
private
Filter
$filter
$freemiumCheckService
private
FreemiumCheckService
$freemiumCheckService
$l
private
Logger
$l
$purchasableServices
private
PurchasableServices|null
$purchasableServices
$purchaseRequestArray
private
array<string|int, mixed>|null
$purchaseRequestArray
$redis
private
Redis
$redis
$request
private
Request
$request
$storeAvailabilityService
private
StoreAvailabilityService
$storeAvailabilityService
Methods
__construct()
public
__construct(CountryService $countryService, CheckoutStoreService $checkoutStoreService, ChargeBeePlansRepository $chargeBeePlansRepository, CheckoutInvoiceService $checkoutInvoiceService, Request $request, AuthComponent $auth, CartService $cartService, StoreAvailabilityService $storeAvailabilityService, Redis $redis, DigitalRegistrationRemoteService $digitalRegistrationRemoteService, FreemiumCheckService $freemiumCheckService, ChargeBeeAddonsRepository $chargeBeeAddonsRepository, ChargeBeeComponent $chargeBeeComponent, ChargeBeeCouponRepository $chargeBeeCouponRepository, EstimatorService $estimator, EntityManager $entityManager, CheckoutLogger $logger, Filter $filter, CountryDateGroupRepository $countryDateGroupRepository) : mixed
Parameters
- $countryService : CountryService
- $checkoutStoreService : CheckoutStoreService
- $chargeBeePlansRepository : ChargeBeePlansRepository
- $checkoutInvoiceService : CheckoutInvoiceService
- $request : Request
- $auth : AuthComponent
- $cartService : CartService
- $storeAvailabilityService : StoreAvailabilityService
- $redis : Redis
- $digitalRegistrationRemoteService : DigitalRegistrationRemoteService
- $freemiumCheckService : FreemiumCheckService
- $chargeBeeAddonsRepository : ChargeBeeAddonsRepository
- $chargeBeeComponent : ChargeBeeComponent
- $chargeBeeCouponRepository : ChargeBeeCouponRepository
- $estimator : EstimatorService
- $entityManager : EntityManager
- $logger : CheckoutLogger
- $filter : Filter
- $countryDateGroupRepository : CountryDateGroupRepository
confirmOrderAction()
public
confirmOrderAction(mixed $userId) : mixed
Parameters
- $userId : mixed
createCartAction()
public
createCartAction(int $userId) : mixed
Parameters
- $userId : int
dropCartAction()
public
dropCartAction(mixed $userId) : mixed
Parameters
- $userId : mixed
getCartAction()
public
getCartAction(int $userId) : mixed
Parameters
- $userId : int
getFakeAction()
public
getFakeAction(int $userId) : mixed
Parameters
- $userId : int
getServiceStatusByUserIdAction()
public
getServiceStatusByUserIdAction(mixed $userId) : mixed
Parameters
- $userId : mixed
getSettingsAction()
public
getSettingsAction(mixed $userId) : array<string|int, mixed>
Parameters
- $userId : mixed
Tags
Return values
array<string|int, mixed>listPlansAction()
public
listPlansAction() : array<string|int, mixed>
Return values
array<string|int, mixed>servicesAction()
public
servicesAction(int $userId) : PurchasableServices
Parameters
- $userId : int
Return values
PurchasableServicesaddAddonToCart()
private
addAddonToCart(CartAddon|null $addon) : mixed
Parameters
- $addon : CartAddon|null
addCouponsToCart()
private
addCouponsToCart(array<string|int, Coupon> $coupons) : mixed
Parameters
- $coupons : array<string|int, Coupon>
addOfferToCart()
private
addOfferToCart(Offer|null $offer) : mixed
Parameters
- $offer : Offer|null
addSubscriptionsToCart()
private
addSubscriptionsToCart(array<string|int, Subscription> $subscription) : mixed
Parameters
- $subscription : array<string|int, Subscription>
applyOfferToRequest()
private
applyOfferToRequest(Offer $offer, mixed &$request) : mixed
Parameters
- $offer : Offer
- $request : mixed
checkAvailabilityByUserId()
private
checkAvailabilityByUserId(int $userId) : true
Parameters
- $userId : int
Tags
Return values
truecheckUser()
private
checkUser(int $userId) : mixed
Parameters
- $userId : int
createEstimate()
private
createEstimate() : mixed
createFakeShoppingSession()
private
createFakeShoppingSession(Client $client, UserAccount $userAccount, Customer $customer) : ShoppingSession
Parameters
- $client : Client
- $userAccount : UserAccount
- $customer : Customer
Return values
ShoppingSessioncreateNewShoppingSession()
private
createNewShoppingSession(Client $client, UserAccount $userAccount, Customer $customer) : ShoppingSession
Parameters
- $client : Client
- $userAccount : UserAccount
- $customer : Customer
Return values
ShoppingSessionexpireCartWithException()
private
expireCartWithException() : mixed
formValidate()
private
formValidate(PurchasableServices $purchasableServices, array<string|int, mixed> $request) : mixed
Parameters
- $purchasableServices : PurchasableServices
- $request : array<string|int, mixed>
Tags
getAddonByEntity()
private
getAddonByEntity(AddonEntity $addonEntity) : mixed
Parameters
- $addonEntity : AddonEntity
getAddonById()
private
getAddonById(int $addonId) : mixed
Parameters
- $addonId : int
getCartAddonByEntity()
private
getCartAddonByEntity(AddonEntity $addonEntity) : mixed
Parameters
- $addonEntity : AddonEntity
getCartAddonById()
private
getCartAddonById(int $addonId) : mixed
Parameters
- $addonId : int
getCartAddons()
private
getCartAddons(mixed $purchasableServices, mixed $request) : mixed
Parameters
- $purchasableServices : mixed
- $request : mixed
getClient()
private
getClient([int $userId = null ]) : Client
Parameters
- $userId : int = null
Return values
ClientgetCoupons()
private
getCoupons(array<string|int, mixed> $request) : mixed
Parameters
- $request : array<string|int, mixed>
getCustomer()
private
getCustomer() : Customer
Return values
CustomergetOffer()
private
getOffer(mixed $request) : Offer|null
Parameters
- $request : mixed
Return values
Offer|nullgetPlanByEntity()
private
getPlanByEntity(ChargeBeePlanEntity $entity[, array<string|int, mixed> $modifier = [] ]) : mixed
Parameters
- $entity : ChargeBeePlanEntity
- $modifier : array<string|int, mixed> = []
getPlanById()
private
getPlanById(int $planId[, array<string|int, mixed> $modifier = [] ]) : mixed
Parameters
- $planId : int
- $modifier : array<string|int, mixed> = []
getPurchasableServices()
private
getPurchasableServices(Client $client) : PurchasableServices
Parameters
- $client : Client
Return values
PurchasableServicesgetPurchaseRequestData()
private
getPurchaseRequestData() : mixed
getShoppingSession()
private
getShoppingSession() : ShoppingSession|null
Return values
ShoppingSession|nullgetSubscriptions()
private
getSubscriptions(PurchasableServices $purchasableServices, mixed $request) : mixed
Parameters
- $purchasableServices : PurchasableServices
- $request : mixed
getUserAccount()
private
getUserAccount() : UserAccount
Return values
UserAccounthandleRequest()
private
handleRequest(Client $client, UserAccount $userAccount, Customer $customer, array<string|int, mixed> $request[, bool $fake = false ]) : ShoppingSession
Parameters
- $client : Client
- $userAccount : UserAccount
- $customer : Customer
- $request : array<string|int, mixed>
- $fake : bool = false
Return values
ShoppingSessionlockCart()
private
lockCart() : RedisLock
Return values
RedisLocklockPurchase()
private
lockPurchase() : RedisLock
Return values
RedisLockpopulateCartAndEstimate()
private
populateCartAndEstimate(PurchasableServices $purchasableServices, array<string|int, mixed> $request) : mixed
Parameters
- $purchasableServices : PurchasableServices
- $request : array<string|int, mixed>
validateCartContent()
private
validateCartContent(ShoppingSession $session) : mixed
Parameters
- $session : ShoppingSession
validateCartPrices()
private
validateCartPrices(ShoppingSession $session) : mixed
Parameters
- $session : ShoppingSession
validateCartTime()
private
validateCartTime(ShoppingSession $session) : mixed
Parameters
- $session : ShoppingSession