From 859d908ff1cf0385fef8b1a0b7731fff12b4dea5 Mon Sep 17 00:00:00 2001 From: hsingyuc Date: Thu, 14 Dec 2023 20:54:13 -0500 Subject: [PATCH] Add intent meta order id to the additional data --- includes/class-wc-payment-gateway-wcpay.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-payment-gateway-wcpay.php b/includes/class-wc-payment-gateway-wcpay.php index 6f38b6d873b..5e79e04223a 100644 --- a/includes/class-wc-payment-gateway-wcpay.php +++ b/includes/class-wc-payment-gateway-wcpay.php @@ -945,7 +945,6 @@ public function process_payment( $order_id ) { $payment_information = $this->prepare_payment_information( $order ); return $this->process_payment_for_order( WC()->cart, $payment_information ); } catch ( Exception $e ) { - // error_log(print_r($e,true)); // We set this variable to be used in following checks. $blocked_due_to_fraud_rules = $e instanceof API_Exception && 'wcpay_blocked_by_fraud_rule' === $e->get_error_code(); @@ -1278,9 +1277,9 @@ public function process_payment_for_order( $cart, $payment_information, $schedul 0, null, [ - 'error_code' => 'order_id_mismatch', - 'intent_meta_data' => $intent->get_metadata(), - 'order_id' => $order_id, + 'error_code' => 'order_id_mismatch', + 'intent_meta_order_id' => $intent_meta_order_id, + 'order_id' => $order_id, ] ); }