From b2b853a2d7bf7f8228da0a41e33c7ff71523daad Mon Sep 17 00:00:00 2001
From: Darren Shelley <darren.shelley@gmail.com>
Date: Tue, 17 Sep 2019 17:59:23 +0100
Subject: [PATCH] Issue #3081799 by Darren Shelley: Ensure
 commerce_payment_transaction uid set

---
 commerce_stripe_pi.module | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/commerce_stripe_pi.module b/commerce_stripe_pi.module
index 0d41796..6a56afa 100755
--- a/commerce_stripe_pi.module
+++ b/commerce_stripe_pi.module
@@ -971,6 +971,10 @@ function commerce_stripe_pi_create_transaction($order_id, PaymentIntent $payment
       $transaction->currency_code = strtoupper($payment_intent->currency);
       $transaction->remote_id = $payment_intent->id;
 
+      // Set the Commerce Payment Transaction UID
+      $order = commerce_order_load($order_id);
+      $transaction->uid = $order->uid;
+
       if ($payment_intent->status === 'succeeded') {
         $transaction->status = COMMERCE_PAYMENT_STATUS_SUCCESS;
         $transaction->remote_status = $payment_intent->status;
-- 
2.20.1 (Apple Git-117)

