BCard - Documentation technique

BusinessPaymentStateService
in package

Détermine l'état de paiement d'inscription d'un compte entreprise (badge « Paiement » de l'admin).

États renvoyés par self::forUser() :

  • paid : le user possède un abonnement ACTIVE ;
  • offline : le dernier paiement PENDING d'un abonnement PENDING est MANUAL (hors plateforme) ;
  • online_failed : ce paiement est DJOMY et son providerStatus vaut FAILED, CANCELLED ou TIMEOUT ;
  • online_pending : ce paiement est DJOMY sans échec connu ;
  • none : aucun abonnement actif ni paiement en attente.

Le résultat est mémorisé pour la durée de la requête. La règle est dupliquée en DQL dans UserRepository::createBusinessAccountsFilterQueryBuilder() (filtre payment_state).

Table of Contents

Constants

NONE  : mixed = 'none'
OFFLINE  : mixed = 'offline'
ONLINE_FAILED  : mixed = 'online_failed'
ONLINE_PENDING  : mixed = 'online_pending'
PAID  : mixed = 'paid'

Properties

$cache  : array<int, string>
$entityManager  : EntityManagerInterface

Methods

__construct()  : mixed
forUser()  : string
Calcule l'état de paiement d'un compte entreprise.
compute()  : string

Constants

Properties

Methods

__construct()

public __construct(EntityManagerInterface $entityManager) : mixed
Parameters
$entityManager : EntityManagerInterface

Lecture des abonnements et paiements du compte.

forUser()

Calcule l'état de paiement d'un compte entreprise.

public forUser(User $user) : string
Parameters
$user : User

Manager de l'entreprise.

Return values
string —

L'une des constantes de la classe (paid, offline, online_pending, online_failed, none).


        
On this page

Search results