payment-kit 1.13.138 → 1.13.139

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.
@@ -619,9 +619,6 @@ router.put('/:id', authPortal, async (req, res) => {
619
619
  if (!paymentMethod) {
620
620
  throw new Error('Subscription should have payment method');
621
621
  }
622
- if (paymentMethod.type === 'stripe') {
623
- throw new Error('Update is not supported for subscriptions paid with stripe');
624
- }
625
622
 
626
623
  const paymentCurrency = await PaymentCurrency.findByPk(subscription.currency_id);
627
624
  if (!paymentCurrency) {
@@ -643,6 +640,10 @@ router.put('/:id', authPortal, async (req, res) => {
643
640
  }
644
641
 
645
642
  if (Array.isArray(req.body.items) && req.body.items.length > 0) {
643
+ if (paymentMethod.type === 'stripe') {
644
+ throw new Error('Update is not supported for subscriptions paid with stripe');
645
+ }
646
+
646
647
  // validate the request
647
648
  const { existingItems, addedItems, updatedItems, deletedItems, newItems } =
648
649
  await validateSubscriptionUpdateRequest(subscription, req.body.items);
package/blocklet.yml CHANGED
@@ -14,7 +14,7 @@ repository:
14
14
  type: git
15
15
  url: git+https://github.com/blocklet/payment-kit.git
16
16
  specVersion: 1.2.8
17
- version: 1.13.138
17
+ version: 1.13.139
18
18
  logo: logo.png
19
19
  files:
20
20
  - dist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payment-kit",
3
- "version": "1.13.138",
3
+ "version": "1.13.139",
4
4
  "scripts": {
5
5
  "dev": "cross-env COMPONENT_STORE_URL=https://test.store.blocklet.dev blocklet dev --open",
6
6
  "eject": "vite eject",
@@ -50,7 +50,7 @@
50
50
  "@arcblock/jwt": "^1.18.110",
51
51
  "@arcblock/ux": "^2.9.29",
52
52
  "@blocklet/logger": "1.16.23",
53
- "@blocklet/payment-react": "1.13.138",
53
+ "@blocklet/payment-react": "1.13.139",
54
54
  "@blocklet/sdk": "1.16.23",
55
55
  "@blocklet/ui-react": "^2.9.29",
56
56
  "@blocklet/uploader": "^0.0.73",
@@ -110,7 +110,7 @@
110
110
  "devDependencies": {
111
111
  "@abtnode/types": "1.16.23",
112
112
  "@arcblock/eslint-config-ts": "^0.2.4",
113
- "@blocklet/payment-types": "1.13.138",
113
+ "@blocklet/payment-types": "1.13.139",
114
114
  "@types/cookie-parser": "^1.4.6",
115
115
  "@types/cors": "^2.8.17",
116
116
  "@types/dotenv-flow": "^3.3.3",
@@ -149,5 +149,5 @@
149
149
  "parser": "typescript"
150
150
  }
151
151
  },
152
- "gitHead": "2865a4ed4a06029cd97a4f0914c1c3c61b5182cb"
152
+ "gitHead": "9b1a2a855dc73b50a26b5ad931f0fdb7728674a4"
153
153
  }