payment-kit 1.13.275 → 1.13.276

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.
@@ -2,6 +2,7 @@
2
2
  import { isValid } from '@arcblock/did';
3
3
  import { Router } from 'express';
4
4
  import Joi from 'joi';
5
+ import isObject from 'lodash/isObject';
5
6
  import pick from 'lodash/pick';
6
7
  import uniq from 'lodash/uniq';
7
8
 
@@ -749,7 +750,12 @@ router.put('/:id', authPortal, async (req, res) => {
749
750
  const client = paymentMethod.getStripeClient();
750
751
  const result = await client.subscriptions.update(stripeSubscriptionId, {
751
752
  proration_behavior: prorationBehavior as any,
752
- metadata: updates.metadata,
753
+ metadata: Object.keys(updates.metadata || {})
754
+ .filter((key) => isObject(updates.metadata![key]) === false)
755
+ .reduce((acc: any, key) => {
756
+ acc[key] = updates.metadata![key];
757
+ return acc;
758
+ }, {}),
753
759
  description: updates.description,
754
760
  items: stripeItems,
755
761
  });
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.275
17
+ version: 1.13.276
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.275",
3
+ "version": "1.13.276",
4
4
  "scripts": {
5
5
  "dev": "blocklet dev --open",
6
6
  "eject": "vite eject",
@@ -51,7 +51,7 @@
51
51
  "@arcblock/ux": "^2.9.90",
52
52
  "@arcblock/validator": "^1.18.123",
53
53
  "@blocklet/logger": "1.16.27",
54
- "@blocklet/payment-react": "1.13.275",
54
+ "@blocklet/payment-react": "1.13.276",
55
55
  "@blocklet/sdk": "1.16.27",
56
56
  "@blocklet/ui-react": "^2.9.90",
57
57
  "@blocklet/uploader": "^0.1.6",
@@ -116,7 +116,7 @@
116
116
  "devDependencies": {
117
117
  "@abtnode/types": "1.16.27",
118
118
  "@arcblock/eslint-config-ts": "^0.3.0",
119
- "@blocklet/payment-types": "1.13.275",
119
+ "@blocklet/payment-types": "1.13.276",
120
120
  "@types/cookie-parser": "^1.4.7",
121
121
  "@types/cors": "^2.8.17",
122
122
  "@types/dotenv-flow": "^3.3.3",
@@ -155,5 +155,5 @@
155
155
  "parser": "typescript"
156
156
  }
157
157
  },
158
- "gitHead": "0f9ae5f5e1e75d3ac743e37676e1beab4dacf1cc"
158
+ "gitHead": "0c48dcf14fab4cb4d3d6de0cf0cf9e10b0287941"
159
159
  }