payment-kit 1.13.135 → 1.13.136

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.
@@ -221,7 +221,13 @@ router.put('/:id/cancel', authPortal, async (req, res) => {
221
221
  }
222
222
 
223
223
  // update cancel at
224
- const updates: Partial<Subscription> = {};
224
+ const updates: Partial<Subscription> = {
225
+ cancelation_details: {
226
+ reason: 'payment_disputed',
227
+ feedback: 'other',
228
+ comment: `Requested by ${req.user?.role}:${req.user?.did}`,
229
+ },
230
+ };
225
231
  if (req.user?.via === 'portal') {
226
232
  updates.cancel_at_period_end = true;
227
233
  updates.cancel_at = subscription.current_period_end;
@@ -293,6 +299,8 @@ router.put('/:id/cancel', authPortal, async (req, res) => {
293
299
  ending_token_balance: {},
294
300
  metadata: {
295
301
  requested_by: req.user?.did,
302
+ unused_period_start: refund === 'last' ? subscription.current_period_start : updates.cancel_at,
303
+ unused_period_end: subscription.current_period_end,
296
304
  },
297
305
  });
298
306
  logger.info('subscription cancel refund done', {
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.135
17
+ version: 1.13.136
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.135",
3
+ "version": "1.13.136",
4
4
  "scripts": {
5
5
  "dev": "cross-env COMPONENT_STORE_URL=https://test.store.blocklet.dev blocklet dev",
6
6
  "eject": "vite eject",
@@ -50,7 +50,7 @@
50
50
  "@arcblock/jwt": "^1.18.108",
51
51
  "@arcblock/ux": "^2.9.23",
52
52
  "@blocklet/logger": "1.16.23-beta-aeb9f5bd",
53
- "@blocklet/payment-react": "1.13.135",
53
+ "@blocklet/payment-react": "1.13.136",
54
54
  "@blocklet/sdk": "1.16.23-beta-aeb9f5bd",
55
55
  "@blocklet/ui-react": "^2.9.23",
56
56
  "@blocklet/uploader": "^0.0.69",
@@ -110,7 +110,7 @@
110
110
  "devDependencies": {
111
111
  "@abtnode/types": "1.16.23-beta-aeb9f5bd",
112
112
  "@arcblock/eslint-config-ts": "^0.2.4",
113
- "@blocklet/payment-types": "1.13.135",
113
+ "@blocklet/payment-types": "1.13.136",
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": "938ddc52dccee653caa0917a65212dd5df8cadd8"
152
+ "gitHead": "ab601e3842610993e41ac2951acaf040a0d345b6"
153
153
  }