You are here

public function Payment::setAmount in Commerce Core 8.2

Sets the payment amount.

Parameters

\Drupal\commerce_price\Price $amount: The payment amount.

Return value

$this

Overrides PaymentInterface::setAmount

File

modules/payment/src/Entity/Payment.php, line 220

Class

Payment
Defines the payment entity class.

Namespace

Drupal\commerce_payment\Entity

Code

public function setAmount(Price $amount) {
  $this
    ->set('amount', $amount);
  return $this;
}