Skip to content

Commit

Permalink
feat: set order status on failed subscription payment
Browse files Browse the repository at this point in the history
  • Loading branch information
Matiasnickolas committed Oct 24, 2024
1 parent 18b2c01 commit 19d13bf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ public function scheduled_subscription_payment($amount_to_charge, WC_Order $rene
$this->logger->logInfo('Suscripción autorizada correctamente para la orden #' . $renewalOrder->get_id());
} catch (Throwable $ex) {
$this->logger->logError("Error al procesar suscripción: " . $ex->getMessage());
$renewalOrder->add_order_note('Error al procesar suscripción, para más detalles revisar el archivo log.');
$logsUrl = admin_url('admin.php?page=transbank_webpay_plus_rest&tbk_tab=logs');
$this->setOrderAsFailed($renewalOrder, 'Error al procesar suscripción, para más detalles revisar el archivo de <a href=" ' . $logsUrl . '">logs</a>.');
}
}

Expand Down

0 comments on commit 19d13bf

Please sign in to comment.