Skip to content

Commit

Permalink
fix cancellation webhook bug
Browse files Browse the repository at this point in the history
  • Loading branch information
baka-san committed Mar 4, 2024
1 parent d34f4b7 commit 2deaf34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class-wc-gateway-komoju-ipn-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected function payment_status_captured($order, $webhookEvent)
*/
protected function payment_status_cancelled($order, $webhookEvent)
{
if (!$this->is_order_cancellable($order)) {
if (!$this->is_order_cancellable($order, $webhookEvent)) {
$transaction_id = $order->get_transaction_id();
$external_order_num = $webhookEvent->external_order_num();
WC_Gateway_Komoju::log('Aborting, transaction_id: ' . $transaction_id . ' and external_order_num: ' . $external_order_num . ' do not match.');
Expand All @@ -251,7 +251,7 @@ protected function payment_status_cancelled($order, $webhookEvent)
*
* @return bool return true if the order is cancellable
*/
protected function is_order_cancellable($order)
protected function is_order_cancellable($order, $webhookEvent)
{
$transaction_id = $order->get_transaction_id();
if (empty($transaction_id)) {
Expand Down

0 comments on commit 2deaf34

Please sign in to comment.