PaymentOrderProcessor.php in Commerce Core 8.2
File
modules/payment/src/PaymentOrderProcessor.php
View source
<?php
namespace Drupal\commerce_payment;
use Drupal\commerce_order\Entity\OrderInterface;
use Drupal\commerce_order\OrderProcessorInterface;
class PaymentOrderProcessor implements OrderProcessorInterface {
protected $paymentOrderUpdater;
public function __construct(PaymentOrderUpdaterInterface $payment_order_updater) {
$this->paymentOrderUpdater = $payment_order_updater;
}
public function process(OrderInterface $order) {
if ($this->paymentOrderUpdater
->needsUpdate($order)) {
$this->paymentOrderUpdater
->updateOrder($order);
}
}
}