From 8947949d5eb0769e3e714b5de130e9680e87b85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reu=CC=88el=20van=20der=20Steege?= Date: Mon, 3 Jul 2023 14:45:30 +0200 Subject: [PATCH] Set payment transaction ID on return. --- src/Gateway.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Gateway.php b/src/Gateway.php index 055e9c3..2598fda 100644 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -199,6 +199,13 @@ public function update_status( Payment $payment ) { $payment->set_status( $status ); + // Transaction ID. + if ( array_key_exists( 'endpointTransactionId', $_POST ) ) { + $transaction_id = \sanitize_text_field( \wp_unslash( $_POST['endpointTransactionId'] ) ); + + $payment->set_transaction_id( $transaction_id ); + } + // Add payment note. $labels = [ 'approval_code' => __( 'Approval code', 'pronamic_ideal' ),