Add $order->getPaidFullTime() method

Created on 27 November 2024, 25 days ago

Problem/Motivation

Commerce orders provide several helpful date-retrieving methods like

$order->getCreatedTime()
$order->getChangedTime()
$order->getPlacedTime()
$oder->getCompletedTime();

The only logical missing piece here is the time when the order was paid in full: $order->getPaidFullTime()

For reports and synchronizations with ERP and maybe other cases, it would be super helpful to have that method.

Orders already also have
$order->isPaid()
method, but no way to retrieve the timestamp when it was paid in full. You need to check the different payments.

Expected behaviour:
$order->getPaidFullTime() returns the timestamp when the order was (last) paid in full. Whenever $order->isPaid() returns false, it should behave like the other methods mentioned above, maybe return NULL.

Steps to reproduce

Try getting the timestamp when the order was paid in full. You can easily check that it has been fully paid by $order->isPaid() but can't easily get the timestamp like for the other cases.

Proposed resolution

Discuss
Implement
Write tests
Release

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

3.0

Component

Payment

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024