Skip to content

Commit

Permalink
Set transaction ID on process_payment to make the order cancellable
Browse files Browse the repository at this point in the history
  • Loading branch information
makotom committed Jul 30, 2024
1 parent f93a6a8 commit 1bb4c6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/class-wc-gateway-komoju-single-slug.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ public function process_payment($order_id, $payment_type = null)
'payment_details' => $token,
]);

$order->set_transaction_id($session->payment_data->external_order_num);
$order->save();

if ($result->redirect_url) {
return [
'result' => 'success',
Expand Down

0 comments on commit 1bb4c6a

Please sign in to comment.