Skip to content

Commit

Permalink
Merge pull request #108 from degica/cashin-fix-cancellation-webhook-bug
Browse files Browse the repository at this point in the history
Fix cancellation webhook bug
  • Loading branch information
Resonious authored Mar 4, 2024
2 parents d34f4b7 + 2deaf34 commit 91ff641
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 91ff641

Please sign in to comment.