@goweekdays/core 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @goweekdays/core
2
2
 
3
+ ## 1.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 39a9527: Paypal invoice webhook handler patch
8
+
3
9
  ## 1.1.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -24960,6 +24960,7 @@ function useInvoiceService() {
24960
24960
  });
24961
24961
  return;
24962
24962
  }
24963
+ session.startTransaction();
24963
24964
  try {
24964
24965
  const invoice = await getByTransactionId(invoiceId);
24965
24966
  if (!invoice) {
@@ -24970,7 +24971,6 @@ function useInvoiceService() {
24970
24971
  "Subscription ID is missing in invoice metadata."
24971
24972
  );
24972
24973
  }
24973
- session?.startTransaction();
24974
24974
  const subscription = await getById(invoice.metadata.subscriptionId);
24975
24975
  if (!subscription) {
24976
24976
  throw new import_utils84.NotFoundError("Subscription not found.");
@@ -25022,13 +25022,14 @@ function useInvoiceService() {
25022
25022
  await session.commitTransaction();
25023
25023
  return "Payment processed successfully.";
25024
25024
  } catch (error) {
25025
- session?.abortTransaction();
25025
+ session.abortTransaction();
25026
25026
  import_utils84.logger.log({
25027
25027
  level: "error",
25028
25028
  message: String(error)
25029
25029
  });
25030
+ throw error;
25030
25031
  } finally {
25031
- session?.endSession();
25032
+ session.endSession();
25032
25033
  }
25033
25034
  }
25034
25035
  return {