public function PayPalExpressCheckout::orderView in Ubercart 8.4
Called when an order is being viewed by an administrator.
Parameters
\Drupal\uc_order\OrderInterface $order: The order that is being viewed.
Return value
array A render array.
Overrides PaymentMethodPluginBase::orderView
File
- payment/
uc_paypal/ src/ Plugin/ Ubercart/ PaymentMethod/ PayPalExpressCheckout.php, line 119
Class
- PayPalExpressCheckout
- Defines the PayPal Express Checkout payment method.
Namespace
Drupal\uc_paypal\Plugin\Ubercart\PaymentMethodCode
public function orderView(OrderInterface $order) {
$txn_id = $this->database
->query("SELECT txn_id FROM {uc_payment_paypal_ipn} WHERE order_id = :id ORDER BY received ASC", [
':id' => $order
->id(),
])
->fetchField();
if (empty($txn_id)) {
$txn_id = $this
->t('Unknown');
}
$build['#markup'] = $this
->t('Transaction ID:<br />@txn_id', [
'@txn_id' => $txn_id,
]);
return $build;
}