payment-kit 1.22.18 → 1.22.19
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.
|
@@ -379,16 +379,7 @@ export class DidnamesAdapter implements VendorAdapter {
|
|
|
379
379
|
|
|
380
380
|
const didNamesResult = await response.json();
|
|
381
381
|
|
|
382
|
-
|
|
383
|
-
url,
|
|
384
|
-
orderId: params.orderId,
|
|
385
|
-
status: didNamesResult.status,
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
return {
|
|
389
|
-
status: didNamesResult.status || 'requested',
|
|
390
|
-
message: didNamesResult.message || 'Domain unbinding requested',
|
|
391
|
-
};
|
|
382
|
+
return didNamesResult;
|
|
392
383
|
} catch (error: any) {
|
|
393
384
|
logger.error('Failed to process return request', {
|
|
394
385
|
error: error.message,
|
|
@@ -852,6 +852,7 @@ async function requestReturnFromSingleVendor(
|
|
|
852
852
|
throw new Error(`No adapter found for vendor: ${vendor.vendor_id}`);
|
|
853
853
|
}
|
|
854
854
|
|
|
855
|
+
// revenue has not been split yet, so no refund operation is needed.
|
|
855
856
|
const returnResult = await vendorAdapter.requestReturn({
|
|
856
857
|
orderId: vendor.order_id,
|
|
857
858
|
reason: `Return request due to: ${reason}`,
|
|
@@ -861,11 +862,10 @@ async function requestReturnFromSingleVendor(
|
|
|
861
862
|
},
|
|
862
863
|
});
|
|
863
864
|
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
status = 'rejected' as 'rejected';
|
|
865
|
+
const { code } = returnResult;
|
|
866
|
+
let status: 'pending' | 'rejected' = 'pending';
|
|
867
|
+
if (code) {
|
|
868
|
+
status = 'rejected';
|
|
869
869
|
}
|
|
870
870
|
|
|
871
871
|
await updateSingleVendorInfo(checkoutSession.id, vendor.vendor_id, {
|
|
@@ -873,7 +873,7 @@ async function requestReturnFromSingleVendor(
|
|
|
873
873
|
returnRequest: {
|
|
874
874
|
reason,
|
|
875
875
|
requestedAt: new Date().toISOString(),
|
|
876
|
-
status
|
|
876
|
+
status,
|
|
877
877
|
returnDetails: returnResult.message,
|
|
878
878
|
},
|
|
879
879
|
});
|
|
@@ -881,7 +881,7 @@ async function requestReturnFromSingleVendor(
|
|
|
881
881
|
logger.info('Return request submitted successfully', {
|
|
882
882
|
vendorId: vendor.vendor_id,
|
|
883
883
|
orderId: vendor.order_id,
|
|
884
|
-
|
|
884
|
+
returnResult,
|
|
885
885
|
});
|
|
886
886
|
} catch (error: any) {
|
|
887
887
|
logger.error('Return request failed', {
|
package/blocklet.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payment-kit",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.19",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "blocklet dev --open",
|
|
6
6
|
"lint": "tsc --noEmit && eslint src api/src --ext .mjs,.js,.jsx,.ts,.tsx",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@blocklet/error": "^0.3.3",
|
|
58
58
|
"@blocklet/js-sdk": "^1.17.3-beta-20251119-102907-28b69b76",
|
|
59
59
|
"@blocklet/logger": "^1.17.3-beta-20251119-102907-28b69b76",
|
|
60
|
-
"@blocklet/payment-broker-client": "1.22.
|
|
61
|
-
"@blocklet/payment-react": "1.22.
|
|
62
|
-
"@blocklet/payment-vendor": "1.22.
|
|
60
|
+
"@blocklet/payment-broker-client": "1.22.19",
|
|
61
|
+
"@blocklet/payment-react": "1.22.19",
|
|
62
|
+
"@blocklet/payment-vendor": "1.22.19",
|
|
63
63
|
"@blocklet/sdk": "^1.17.3-beta-20251119-102907-28b69b76",
|
|
64
64
|
"@blocklet/ui-react": "^3.2.7",
|
|
65
65
|
"@blocklet/uploader": "^0.3.11",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"devDependencies": {
|
|
130
130
|
"@abtnode/types": "^1.17.3-beta-20251119-102907-28b69b76",
|
|
131
131
|
"@arcblock/eslint-config-ts": "^0.3.3",
|
|
132
|
-
"@blocklet/payment-types": "1.22.
|
|
132
|
+
"@blocklet/payment-types": "1.22.19",
|
|
133
133
|
"@types/cookie-parser": "^1.4.9",
|
|
134
134
|
"@types/cors": "^2.8.19",
|
|
135
135
|
"@types/debug": "^4.1.12",
|
|
@@ -176,5 +176,5 @@
|
|
|
176
176
|
"parser": "typescript"
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
|
-
"gitHead": "
|
|
179
|
+
"gitHead": "2a79b0a9d2a27f1605d8f59bec8c0d0d963ba334"
|
|
180
180
|
}
|