Payment
in package
Paiement effectué pour une commande de carte physique, un abonnement ou une carte virtuelle.
Un paiement peut se rattacher, indépendamment les uns des autres, à une carte Card,
un utilisateur User, une entreprise Company, un abonnement Subscription
ou une commande Order — toutes ces relations ManyToOne sont facultatives. En lecture
du code appelant, un même paiement semble ne servir en pratique qu'un seul de ces cas d'usage
à la fois, mais il s'agit d'une lecture déduite : rien dans l'entité ni dans le schéma
(contrainte, validation applicative) ne l'impose ou ne le garantit. status prend l'une
des valeurs PENDING, ACCEPTED, REJECTED ou COMPLETED (constantes *_STATUS).
paymentMethod prend l'une des valeurs CREDIT_CARD, ORANGE_MONEY, DELIVERY_CASH,
PRO_SUBSCRIPTION, COMPANY_FREE ou MANUAL. stripePaymentIntentId n'est renseigné que
pour les paiements par carte bancaire passés par Stripe. getAmout()/setAmout() sont des
alias historiques (faute de frappe conservée) de getAmount()/setAmount(), qui restent la
forme à utiliser ; la colonne elle-même porte le nom amout en base.
Attributes
- #[Entity]
- $repositoryClass: \App\Repository\PaymentRepository::class
- #[Index]
- $name: 'idx_payment_status'
- $columns: ['status']
- #[Index]
- $name: 'idx_payment_created_at'
- $columns: ['created_at']
- #[Table]
- $name: 'payment'
Table of Contents
Constants
- ACCEPTED_STATUS : mixed = "ACCEPTED"
- COMPANY_FREE : mixed = "COMPANY_FREE"
- COMPLETED_STATUS : mixed = "COMPLETED"
- CREDIT_CARD : mixed = "CREDIT_CARD"
- DELIVERY_CASH : mixed = "DELIVERY_CASH"
- MANUAL : mixed = "MANUAL"
- ORANGE_MONEY : mixed = "ORANGE_MONEY"
- PENDING_STATUS : mixed = "PENDING"
- PRO_SUBSCRIPTION : mixed = "PRO_SUBSCRIPTION"
- REJECTED_STATUS : mixed = "REJECTED"
Properties
- $amount : string|null
- $card : Card|null
- $company : Company|null
- $createdAt : DateTimeImmutable|null
- $id : int|null
- $order : Order|null
- $paymentMethod : string|null
- $status : string|null
- $stripePaymentIntentId : string|null
- $subscription : Subscription|null
- $updatedAt : DateTimeImmutable|null
- $user : User|null
Methods
- getAmount() : string|null
- getAmout() : string|null
- getCard() : Card|null
- getCompany() : Company|null
- getCreatedAt() : DateTimeImmutable|null
- getId() : int|null
- getOrder() : Order|null
- getPaymentMethod() : string|null
- getStatus() : string|null
- getStripePaymentIntentId() : string|null
- getSubscription() : Subscription|null
- getUpdatedAt() : DateTimeImmutable|null
- getUser() : User|null
- setAmount() : static
- setAmout() : static
- setCard() : static
- setCompany() : static
- setCreatedAt() : static
- setOrder() : static
- setPaymentMethod() : static
- setStatus() : static
- setStripePaymentIntentId() : static
- setSubscription() : static
- setUpdatedAt() : static
- setUser() : static
Constants
ACCEPTED_STATUS
public
mixed
ACCEPTED_STATUS
= "ACCEPTED"
COMPANY_FREE
public
mixed
COMPANY_FREE
= "COMPANY_FREE"
COMPLETED_STATUS
public
mixed
COMPLETED_STATUS
= "COMPLETED"
CREDIT_CARD
public
mixed
CREDIT_CARD
= "CREDIT_CARD"
DELIVERY_CASH
public
mixed
DELIVERY_CASH
= "DELIVERY_CASH"
MANUAL
public
mixed
MANUAL
= "MANUAL"
ORANGE_MONEY
public
mixed
ORANGE_MONEY
= "ORANGE_MONEY"
PENDING_STATUS
public
mixed
PENDING_STATUS
= "PENDING"
PRO_SUBSCRIPTION
public
mixed
PRO_SUBSCRIPTION
= "PRO_SUBSCRIPTION"
REJECTED_STATUS
public
mixed
REJECTED_STATUS
= "REJECTED"
Properties
$amount
private
string|null
$amount
= null
Attributes
- #[Column]
- $name: 'amout'
- $length: 100
$card
private
Card|null
$card
= null
Attributes
- #[ManyToOne]
- $inversedBy: 'payments'
$company
private
Company|null
$company
= null
Attributes
- #[JoinColumn]
- $nullable: true
- #[ManyToOne]
- $targetEntity: \App\Entity\Company::class
- $inversedBy: 'payments'
$createdAt
private
DateTimeImmutable|null
$createdAt
= null
Attributes
- #[Column]
- $name: 'created_at'
$id
private
int|null
$id
= null
Attributes
- #[Column]
- #[GeneratedValue]
- #[Id]
$order
private
Order|null
$order
= null
Attributes
- #[ManyToOne]
- $inversedBy: 'payments'
$paymentMethod
private
string|null
$paymentMethod
= null
Attributes
- #[Column]
- $length: 100
- $nullable: true
$status
private
string|null
$status
= null
Attributes
- #[Column]
- $length: 50
$stripePaymentIntentId
private
string|null
$stripePaymentIntentId
= null
Attributes
- #[Column]
- $length: 255
- $nullable: true
$subscription
private
Subscription|null
$subscription
= null
Attributes
- #[JoinColumn]
- $nullable: true
- #[ManyToOne]
- $targetEntity: \App\Entity\Subscription::class
$updatedAt
private
DateTimeImmutable|null
$updatedAt
= null
Attributes
- #[Column]
$user
private
User|null
$user
= null
Attributes
- #[ManyToOne]
- $inversedBy: 'payments'
Methods
getAmount()
public
getAmount() : string|null
Return values
string|nullgetAmout()
public
getAmout() : string|null
Return values
string|nullgetCard()
public
getCard() : Card|null
Return values
Card|nullgetCompany()
public
getCompany() : Company|null
Return values
Company|nullgetCreatedAt()
public
getCreatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetId()
public
getId() : int|null
Return values
int|nullgetOrder()
public
getOrder() : Order|null
Return values
Order|nullgetPaymentMethod()
public
getPaymentMethod() : string|null
Return values
string|nullgetStatus()
public
getStatus() : string|null
Return values
string|nullgetStripePaymentIntentId()
public
getStripePaymentIntentId() : string|null
Return values
string|nullgetSubscription()
public
getSubscription() : Subscription|null
Return values
Subscription|nullgetUpdatedAt()
public
getUpdatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetUser()
public
getUser() : User|null
Return values
User|nullsetAmount()
public
setAmount(string $amount) : static
Parameters
- $amount : string
Return values
staticsetAmout()
public
setAmout(string $amout) : static
Parameters
- $amout : string
Return values
staticsetCard()
public
setCard(Card|null $card) : static
Parameters
- $card : Card|null
Return values
staticsetCompany()
public
setCompany(Company|null $company) : static
Parameters
- $company : Company|null
Return values
staticsetCreatedAt()
public
setCreatedAt(DateTimeImmutable $createdAt) : static
Parameters
- $createdAt : DateTimeImmutable
Return values
staticsetOrder()
public
setOrder(Order|null $order) : static
Parameters
- $order : Order|null
Return values
staticsetPaymentMethod()
public
setPaymentMethod(string|null $paymentMethod) : static
Parameters
- $paymentMethod : string|null
Return values
staticsetStatus()
public
setStatus(string $status) : static
Parameters
- $status : string
Return values
staticsetStripePaymentIntentId()
public
setStripePaymentIntentId(string|null $stripePaymentIntentId) : static
Parameters
- $stripePaymentIntentId : string|null
Return values
staticsetSubscription()
public
setSubscription(Subscription|null $subscription) : static
Parameters
- $subscription : Subscription|null
Return values
staticsetUpdatedAt()
public
setUpdatedAt(DateTimeImmutable $updatedAt) : static
Parameters
- $updatedAt : DateTimeImmutable
Return values
staticsetUser()
public
setUser(User|null $user) : static
Parameters
- $user : User|null