payment-kit 1.13.243 → 1.13.244

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.
@@ -212,7 +212,14 @@ router.put('/:id/cancel', authPortal, async (req, res) => {
212
212
  return res.status(400).json({ error: 'Subscription already canceled' });
213
213
  }
214
214
 
215
- const { at = 'current_period_end', refund = 'none', time, feedback = 'other', comment = '' } = req.body;
215
+ const {
216
+ at = 'current_period_end',
217
+ refund = 'none',
218
+ time,
219
+ feedback = 'other',
220
+ comment = '',
221
+ reason = 'payment_disputed',
222
+ } = req.body;
216
223
  if (at === 'custom' && dayjs(time).unix() < dayjs().unix()) {
217
224
  return res.status(400).json({ error: 'cancel at must be a future timestamp' });
218
225
  }
@@ -220,9 +227,9 @@ router.put('/:id/cancel', authPortal, async (req, res) => {
220
227
  // update cancel at
221
228
  const updates: Partial<Subscription> = {
222
229
  cancelation_details: {
223
- reason: 'payment_disputed',
224
- feedback: 'other',
225
- comment: `Requested by ${req.user?.role}:${req.user?.did}`,
230
+ comment: comment || `Requested by ${req.user?.role}:${req.user?.did}`,
231
+ reason: reason || 'payment_disputed',
232
+ feedback: feedback || 'other',
226
233
  },
227
234
  };
228
235
  const now = dayjs().unix() + 3;
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.243
17
+ version: 1.13.244
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.243",
3
+ "version": "1.13.244",
4
4
  "scripts": {
5
5
  "dev": "cross-env COMPONENT_STORE_URL=https://test.store.blocklet.dev blocklet dev --open",
6
6
  "eject": "vite eject",
@@ -51,7 +51,7 @@
51
51
  "@arcblock/ux": "^2.9.77",
52
52
  "@arcblock/validator": "^1.18.116",
53
53
  "@blocklet/logger": "1.16.26",
54
- "@blocklet/payment-react": "1.13.243",
54
+ "@blocklet/payment-react": "1.13.244",
55
55
  "@blocklet/sdk": "1.16.26",
56
56
  "@blocklet/ui-react": "^2.9.77",
57
57
  "@blocklet/uploader": "^0.1.6",
@@ -116,7 +116,7 @@
116
116
  "devDependencies": {
117
117
  "@abtnode/types": "1.16.26",
118
118
  "@arcblock/eslint-config-ts": "^0.3.0",
119
- "@blocklet/payment-types": "1.13.243",
119
+ "@blocklet/payment-types": "1.13.244",
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": "b699d54327e794d3b63e5c217ba5cddf759187b7"
158
+ "gitHead": "b658527856e8ff8d33c15af1b2aa568320984751"
159
159
  }