Skip to content

Commit

Permalink
Add intent meta order id to the additional data
Browse files Browse the repository at this point in the history
  • Loading branch information
hsingyuc committed Dec 15, 2023
1 parent 04ad318 commit 859d908
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions includes/class-wc-payment-gateway-wcpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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,
]
);
}
Expand Down

0 comments on commit 859d908

Please sign in to comment.