public function Payment::getRefundedAmount in Commerce Core 8.2
Gets the refunded payment amount.
Return value
\Drupal\commerce_price\Price|null The refunded payment amount, or NULL.
Overrides PaymentInterface::getRefundedAmount
2 calls to Payment::getRefundedAmount()
- Payment::getBalance in modules/
payment/ src/ Entity/ Payment.php - Gets the payment balance.
- Payment::preSave in modules/
payment/ src/ Entity/ Payment.php - Acts on an entity before the presave hook is invoked.
File
- modules/
payment/ src/ Entity/ Payment.php, line 228
Class
- Payment
- Defines the payment entity class.
Namespace
Drupal\commerce_payment\EntityCode
public function getRefundedAmount() {
if (!$this
->get('refunded_amount')
->isEmpty()) {
return $this
->get('refunded_amount')
->first()
->toPrice();
}
}