From 0be3db31873a5b2efe0c5d41f3d79877cacfc26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Manciot?= Date: Thu, 23 Apr 2026 19:24:39 +0200 Subject: [PATCH] chore: bump version to 0.9.4.1 and update webhook error handling for test mode --- build.sbt | 2 +- .../scala/app/softnetwork/payment/config/StripeApi.scala | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 37501be..cf95fbb 100644 --- a/build.sbt +++ b/build.sbt @@ -18,7 +18,7 @@ ThisBuild / organization := "app.softnetwork" name := "payment" -ThisBuild / version := "0.9.4" +ThisBuild / version := "0.9.4.1" ThisBuild / scalaVersion := scala212 diff --git a/stripe/src/main/scala/app/softnetwork/payment/config/StripeApi.scala b/stripe/src/main/scala/app/softnetwork/payment/config/StripeApi.scala index 7b8e109..52b7b0b 100644 --- a/stripe/src/main/scala/app/softnetwork/payment/config/StripeApi.scala +++ b/stripe/src/main/scala/app/softnetwork/payment/config/StripeApi.scala @@ -224,7 +224,11 @@ object StripeApi { stripeApi case Failure(f) => Console.err.println(s"Error creating stripe webhook endpoint: ${f.getMessage}") - throw f + if (apiKey.startsWith("sk_test_")) { // In test mode, we can proceed without a webhook endpoint + stripeApi + } else { + throw f + } } } }