How to check payment successfully? I use module ubercart. Payment method is PayPal. I want process some task after user payment successfully. I write custom module. I want know how to check user payment successfully with some hook, event can catch?
I have the answer with suggestion of maintainer module. I can use hook_uc_payment_receipt_insert() to do that.

/**
 * Implements hook_uc_payment_receipt_insert().
 */
function uc_payment_uc_payment_receipt_insert(PaymentReceiptInterface $payment) {
  $order = $payment-&gt;getOrder();

  // Log a message against the order.
  $method_name = $payment-&gt;getMethod() ? $payment-&gt;getMethod()-&gt;getPlugin()-&gt;cartReviewTitle() : t('Other');
  $log_message = t('@method payment for @amount entered.', array('@method' =&gt; $method_name, '@amount' =&gt; uc_currency_format($payment-&gt;getAmount())));
  $order-&gt;logChanges(array($log_message));

  // Automatically mark paid orders as "payment received".
  // @todo Remove when Rules is available.
  if (uc_payment_balance($order) &lt;= 0) {
    $state = $order-&gt;getStateId();
    if ($state == 'in_checkout' || $state == 'post_checkout') {
      $order-&gt;setStatusId('payment_received')-&gt;save();
    }
  }
}


Source