ce-storefront 0.22.2 → 0.22.4
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.
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/sdks.js +2 -2
- package/esm/lib/sdks.js.map +1 -1
- package/esm/models/components/juspaycarddetail.d.ts +13 -0
- package/esm/models/components/juspaycarddetail.d.ts.map +1 -1
- package/esm/models/components/juspaycarddetail.js +10 -10
- package/esm/models/components/juspaycarddetail.js.map +1 -1
- package/esm/models/components/juspayexpresscheckout.d.ts +2 -2
- package/esm/models/components/juspayexpresscheckout.d.ts.map +1 -1
- package/esm/models/components/juspayexpresscheckout.js +1 -1
- package/esm/models/components/juspayexpresscheckout.js.map +1 -1
- package/esm/models/components/juspayexpresscheckoutresponse.d.ts +29 -0
- package/esm/models/components/juspayexpresscheckoutresponse.d.ts.map +1 -1
- package/esm/models/components/juspayexpresscheckoutresponse.js +27 -0
- package/esm/models/components/juspayexpresscheckoutresponse.js.map +1 -1
- package/esm/models/components/juspayhypercheckout.d.ts +18 -0
- package/esm/models/components/juspayhypercheckout.d.ts.map +1 -1
- package/esm/models/components/juspayhypercheckout.js +3 -0
- package/esm/models/components/juspayhypercheckout.js.map +1 -1
- package/esm/models/components/juspaynetbanking.d.ts +9 -4
- package/esm/models/components/juspaynetbanking.d.ts.map +1 -1
- package/esm/models/components/juspaynetbanking.js +0 -4
- package/esm/models/components/juspaynetbanking.js.map +1 -1
- package/esm/models/components/juspaynewcard.d.ts +12 -16
- package/esm/models/components/juspaynewcard.d.ts.map +1 -1
- package/esm/models/components/juspaynewcard.js +0 -14
- package/esm/models/components/juspaynewcard.js.map +1 -1
- package/esm/models/components/juspaysavedcardtoken.d.ts +37 -10
- package/esm/models/components/juspaysavedcardtoken.d.ts.map +1 -1
- package/esm/models/components/juspaysavedcardtoken.js +12 -9
- package/esm/models/components/juspaysavedcardtoken.js.map +1 -1
- package/esm/models/components/juspayupicollect.d.ts +9 -4
- package/esm/models/components/juspayupicollect.d.ts.map +1 -1
- package/esm/models/components/juspayupicollect.js +0 -4
- package/esm/models/components/juspayupicollect.js.map +1 -1
- package/esm/models/components/juspayupiintent.d.ts +9 -6
- package/esm/models/components/juspayupiintent.d.ts.map +1 -1
- package/esm/models/components/juspayupiintent.js +0 -6
- package/esm/models/components/juspayupiintent.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +2 -2
- package/src/models/components/juspaycarddetail.ts +92 -69
- package/src/models/components/juspayexpresscheckout.ts +3 -3
- package/src/models/components/juspayexpresscheckoutresponse.ts +66 -0
- package/src/models/components/juspayhypercheckout.ts +18 -0
- package/src/models/components/juspaynetbanking.ts +9 -8
- package/src/models/components/juspaynewcard.ts +12 -28
- package/src/models/components/juspaysavedcardtoken.ts +40 -21
- package/src/models/components/juspayupicollect.ts +9 -8
- package/src/models/components/juspayupiintent.ts +9 -12
|
@@ -14,6 +14,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
14
14
|
export type CvvLessDetails = {
|
|
15
15
|
gateway?: string | undefined;
|
|
16
16
|
gatewayReferenceIds?: Array<string> | undefined;
|
|
17
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export type Token = {
|
|
@@ -32,6 +33,7 @@ export type Token = {
|
|
|
32
33
|
provisionTokenId?: string | undefined;
|
|
33
34
|
cardIsin?: string | undefined;
|
|
34
35
|
expiryYear?: string | undefined;
|
|
36
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
export type Tokens = {
|
|
@@ -47,6 +49,7 @@ export type Tokens = {
|
|
|
47
49
|
provisionTokenId?: string | undefined;
|
|
48
50
|
cardIsin?: string | undefined;
|
|
49
51
|
expiryYear?: string | undefined;
|
|
52
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
50
53
|
};
|
|
51
54
|
|
|
52
55
|
export type Metadata = {
|
|
@@ -84,10 +87,12 @@ export type JuspayCardDetail = {
|
|
|
84
87
|
nameOnCard: string;
|
|
85
88
|
countryCode: string;
|
|
86
89
|
atmPinAuthSupport?: boolean | undefined;
|
|
90
|
+
directOtpSupport?: boolean | undefined;
|
|
87
91
|
cardNumber: string;
|
|
88
92
|
cardIsin: string;
|
|
89
93
|
cardBrand: string;
|
|
90
94
|
cardIssuerCountry: string;
|
|
95
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
91
96
|
};
|
|
92
97
|
|
|
93
98
|
/** @internal */
|
|
@@ -95,10 +100,14 @@ export const CvvLessDetails$inboundSchema: z.ZodType<
|
|
|
95
100
|
CvvLessDetails,
|
|
96
101
|
z.ZodTypeDef,
|
|
97
102
|
unknown
|
|
98
|
-
> =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
> = collectExtraKeys$(
|
|
104
|
+
z.object({
|
|
105
|
+
gateway: z.string().optional(),
|
|
106
|
+
gateway_reference_ids: z.array(z.string()).optional(),
|
|
107
|
+
}).catchall(z.any()),
|
|
108
|
+
"additionalProperties",
|
|
109
|
+
true,
|
|
110
|
+
).transform((v) => {
|
|
102
111
|
return remap$(v, {
|
|
103
112
|
"gateway_reference_ids": "gatewayReferenceIds",
|
|
104
113
|
});
|
|
@@ -115,25 +124,29 @@ export function cvvLessDetailsFromJSON(
|
|
|
115
124
|
}
|
|
116
125
|
|
|
117
126
|
/** @internal */
|
|
118
|
-
export const Token$inboundSchema: z.ZodType<Token, z.ZodTypeDef, unknown> =
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
127
|
+
export const Token$inboundSchema: z.ZodType<Token, z.ZodTypeDef, unknown> =
|
|
128
|
+
collectExtraKeys$(
|
|
129
|
+
z.object({
|
|
130
|
+
tokenization_status: z.string().optional(),
|
|
131
|
+
support_token_transaction: z.boolean().optional(),
|
|
132
|
+
last_four_digits: z.string().optional(),
|
|
133
|
+
cvv_less_support: z.boolean().optional(),
|
|
134
|
+
vault_provider: z.string().optional(),
|
|
135
|
+
par: z.string().optional(),
|
|
136
|
+
card_reference: z.string().optional(),
|
|
137
|
+
expiry_month: z.string().optional(),
|
|
138
|
+
token_supported_gateways: z.array(z.string()).optional(),
|
|
139
|
+
card_fingerprint: z.string().optional(),
|
|
140
|
+
cvv_less_details: z.array(z.lazy(() => CvvLessDetails$inboundSchema))
|
|
141
|
+
.optional(),
|
|
142
|
+
cvv_less_supported_gateways: z.array(z.string()).optional(),
|
|
143
|
+
provision_token_id: z.string().optional(),
|
|
144
|
+
card_isin: z.string().optional(),
|
|
145
|
+
expiry_year: z.string().optional(),
|
|
146
|
+
}).catchall(z.any()),
|
|
147
|
+
"additionalProperties",
|
|
148
|
+
true,
|
|
149
|
+
).transform((v) => {
|
|
137
150
|
return remap$(v, {
|
|
138
151
|
"tokenization_status": "tokenizationStatus",
|
|
139
152
|
"support_token_transaction": "supportTokenTransaction",
|
|
@@ -163,21 +176,25 @@ export function tokenFromJSON(
|
|
|
163
176
|
}
|
|
164
177
|
|
|
165
178
|
/** @internal */
|
|
166
|
-
export const Tokens$inboundSchema: z.ZodType<Tokens, z.ZodTypeDef, unknown> =
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
export const Tokens$inboundSchema: z.ZodType<Tokens, z.ZodTypeDef, unknown> =
|
|
180
|
+
collectExtraKeys$(
|
|
181
|
+
z.object({
|
|
182
|
+
tokenization_status: z.string().optional(),
|
|
183
|
+
last_four_digits: z.string().optional(),
|
|
184
|
+
provider_category: z.string().optional(),
|
|
185
|
+
vault_provider: z.string().optional(),
|
|
186
|
+
par: z.string().optional(),
|
|
187
|
+
card_reference: z.string().optional(),
|
|
188
|
+
card_token: z.string().optional(),
|
|
189
|
+
expiry_month: z.string().optional(),
|
|
190
|
+
card_fingerprint: z.string().optional(),
|
|
191
|
+
provision_token_id: z.string().optional(),
|
|
192
|
+
card_isin: z.string().optional(),
|
|
193
|
+
expiry_year: z.string().optional(),
|
|
194
|
+
}).catchall(z.any()),
|
|
195
|
+
"additionalProperties",
|
|
196
|
+
true,
|
|
197
|
+
).transform((v) => {
|
|
181
198
|
return remap$(v, {
|
|
182
199
|
"tokenization_status": "tokenizationStatus",
|
|
183
200
|
"last_four_digits": "lastFourDigits",
|
|
@@ -237,37 +254,42 @@ export const JuspayCardDetail$inboundSchema: z.ZodType<
|
|
|
237
254
|
JuspayCardDetail,
|
|
238
255
|
z.ZodTypeDef,
|
|
239
256
|
unknown
|
|
240
|
-
> =
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
257
|
+
> = collectExtraKeys$(
|
|
258
|
+
z.object({
|
|
259
|
+
card_sub_type: z.string(),
|
|
260
|
+
token: z.lazy(() => Token$inboundSchema).optional(),
|
|
261
|
+
extended_card_type: z.string(),
|
|
262
|
+
tokens: z.array(z.lazy(() => Tokens$inboundSchema)).optional(),
|
|
263
|
+
nickname: z.string(),
|
|
264
|
+
provider_category: z.string(),
|
|
265
|
+
vault_provider: z.string(),
|
|
266
|
+
card_reference: z.string(),
|
|
267
|
+
card_type: z.string(),
|
|
268
|
+
metadata: z.lazy(() => Metadata$inboundSchema),
|
|
269
|
+
card_issuer: z.string(),
|
|
270
|
+
card_token: z.string(),
|
|
271
|
+
health: z.string(),
|
|
272
|
+
card_exp_month: z.string(),
|
|
273
|
+
mandate_support: z.boolean(),
|
|
274
|
+
provider: z.string(),
|
|
275
|
+
card_sub_type_category: z.string(),
|
|
276
|
+
expired: z.boolean(),
|
|
277
|
+
card_fingerprint: z.string(),
|
|
278
|
+
tokenize_support: z.boolean(),
|
|
279
|
+
juspay_bank_code: z.string(),
|
|
280
|
+
card_exp_year: z.string(),
|
|
281
|
+
name_on_card: z.string(),
|
|
282
|
+
country_code: z.string(),
|
|
283
|
+
atm_pin_auth_support: z.boolean().optional(),
|
|
284
|
+
direct_otp_support: z.boolean().optional(),
|
|
285
|
+
card_number: z.string(),
|
|
286
|
+
card_isin: z.string(),
|
|
287
|
+
card_brand: z.string(),
|
|
288
|
+
card_issuer_country: z.string(),
|
|
289
|
+
}).catchall(z.any()),
|
|
290
|
+
"additionalProperties",
|
|
291
|
+
true,
|
|
292
|
+
).transform((v) => {
|
|
271
293
|
return remap$(v, {
|
|
272
294
|
"card_sub_type": "cardSubType",
|
|
273
295
|
"extended_card_type": "extendedCardType",
|
|
@@ -287,6 +309,7 @@ export const JuspayCardDetail$inboundSchema: z.ZodType<
|
|
|
287
309
|
"name_on_card": "nameOnCard",
|
|
288
310
|
"country_code": "countryCode",
|
|
289
311
|
"atm_pin_auth_support": "atmPinAuthSupport",
|
|
312
|
+
"direct_otp_support": "directOtpSupport",
|
|
290
313
|
"card_number": "cardNumber",
|
|
291
314
|
"card_isin": "cardIsin",
|
|
292
315
|
"card_brand": "cardBrand",
|
|
@@ -35,16 +35,16 @@ import {
|
|
|
35
35
|
export type JusPayExpressCheckout =
|
|
36
36
|
| JusPayNewCard
|
|
37
37
|
| JusPaySavedCardToken
|
|
38
|
-
| JuspayUpiIntent
|
|
39
38
|
| JuspayUpiCollect
|
|
39
|
+
| JuspayUpiIntent
|
|
40
40
|
| JuspayNetBanking;
|
|
41
41
|
|
|
42
42
|
/** @internal */
|
|
43
43
|
export type JusPayExpressCheckout$Outbound =
|
|
44
44
|
| JusPayNewCard$Outbound
|
|
45
45
|
| JusPaySavedCardToken$Outbound
|
|
46
|
-
| JuspayUpiIntent$Outbound
|
|
47
46
|
| JuspayUpiCollect$Outbound
|
|
47
|
+
| JuspayUpiIntent$Outbound
|
|
48
48
|
| JuspayNetBanking$Outbound;
|
|
49
49
|
|
|
50
50
|
/** @internal */
|
|
@@ -55,8 +55,8 @@ export const JusPayExpressCheckout$outboundSchema: z.ZodType<
|
|
|
55
55
|
> = z.union([
|
|
56
56
|
JusPayNewCard$outboundSchema,
|
|
57
57
|
JusPaySavedCardToken$outboundSchema,
|
|
58
|
-
JuspayUpiIntent$outboundSchema,
|
|
59
58
|
JuspayUpiCollect$outboundSchema,
|
|
59
|
+
JuspayUpiIntent$outboundSchema,
|
|
60
60
|
JuspayNetBanking$outboundSchema,
|
|
61
61
|
]);
|
|
62
62
|
|
|
@@ -19,6 +19,20 @@ export type OfferDetails = {
|
|
|
19
19
|
offers: Array<Offers>;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
export type SDKParams = {
|
|
23
|
+
tr?: string | undefined;
|
|
24
|
+
merchantVpa?: string | undefined;
|
|
25
|
+
customerLastName?: string | undefined;
|
|
26
|
+
merchantName?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The UPI intent URL of the payment. This URL is used to redirect the customer to the UPI app for payment.
|
|
29
|
+
*/
|
|
30
|
+
pgIntentUrl?: string | undefined;
|
|
31
|
+
amount?: string | undefined;
|
|
32
|
+
tid?: string | undefined;
|
|
33
|
+
customerFirstName?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
22
36
|
/**
|
|
23
37
|
* Available only when Direct OTP is enabled for the card; otherwise this object is absent.
|
|
24
38
|
*/
|
|
@@ -55,6 +69,7 @@ export type Authentication = {
|
|
|
55
69
|
};
|
|
56
70
|
|
|
57
71
|
export type Payment = {
|
|
72
|
+
sdkParams?: SDKParams | undefined;
|
|
58
73
|
authentication?: Authentication | undefined;
|
|
59
74
|
};
|
|
60
75
|
|
|
@@ -62,9 +77,21 @@ export type Payment = {
|
|
|
62
77
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPayExpressCheckoutResponse} - API reference for the JusPayExpressCheckoutResponse schema
|
|
63
78
|
*/
|
|
64
79
|
export type JusPayExpressCheckoutResponse = {
|
|
80
|
+
/**
|
|
81
|
+
* The transaction ID of the payment.
|
|
82
|
+
*/
|
|
65
83
|
txnId: string;
|
|
84
|
+
/**
|
|
85
|
+
* The transaction UUID of the payment.
|
|
86
|
+
*/
|
|
66
87
|
txnUuid: string;
|
|
88
|
+
/**
|
|
89
|
+
* The status of the payment.
|
|
90
|
+
*/
|
|
67
91
|
status: string;
|
|
92
|
+
/**
|
|
93
|
+
* The order ID of the payment.
|
|
94
|
+
*/
|
|
68
95
|
orderId: string;
|
|
69
96
|
juspay: Juspay;
|
|
70
97
|
offerDetails: OfferDetails;
|
|
@@ -126,6 +153,40 @@ export function offerDetailsFromJSON(
|
|
|
126
153
|
);
|
|
127
154
|
}
|
|
128
155
|
|
|
156
|
+
/** @internal */
|
|
157
|
+
export const SDKParams$inboundSchema: z.ZodType<
|
|
158
|
+
SDKParams,
|
|
159
|
+
z.ZodTypeDef,
|
|
160
|
+
unknown
|
|
161
|
+
> = z.object({
|
|
162
|
+
tr: z.string().optional(),
|
|
163
|
+
merchant_vpa: z.string().optional(),
|
|
164
|
+
customer_last_name: z.string().optional(),
|
|
165
|
+
merchant_name: z.string().optional(),
|
|
166
|
+
pg_intent_url: z.string().optional(),
|
|
167
|
+
amount: z.string().optional(),
|
|
168
|
+
tid: z.string().optional(),
|
|
169
|
+
customer_first_name: z.string().optional(),
|
|
170
|
+
}).transform((v) => {
|
|
171
|
+
return remap$(v, {
|
|
172
|
+
"merchant_vpa": "merchantVpa",
|
|
173
|
+
"customer_last_name": "customerLastName",
|
|
174
|
+
"merchant_name": "merchantName",
|
|
175
|
+
"pg_intent_url": "pgIntentUrl",
|
|
176
|
+
"customer_first_name": "customerFirstName",
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
export function sdkParamsFromJSON(
|
|
181
|
+
jsonString: string,
|
|
182
|
+
): SafeParseResult<SDKParams, SDKValidationError> {
|
|
183
|
+
return safeParse(
|
|
184
|
+
jsonString,
|
|
185
|
+
(x) => SDKParams$inboundSchema.parse(JSON.parse(x)),
|
|
186
|
+
`Failed to parse 'SDKParams' from JSON`,
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
129
190
|
/** @internal */
|
|
130
191
|
export const Params$inboundSchema: z.ZodType<Params, z.ZodTypeDef, unknown> = z
|
|
131
192
|
.object({
|
|
@@ -183,7 +244,12 @@ export function authenticationFromJSON(
|
|
|
183
244
|
/** @internal */
|
|
184
245
|
export const Payment$inboundSchema: z.ZodType<Payment, z.ZodTypeDef, unknown> =
|
|
185
246
|
z.object({
|
|
247
|
+
sdk_params: z.lazy(() => SDKParams$inboundSchema).optional(),
|
|
186
248
|
authentication: z.lazy(() => Authentication$inboundSchema).optional(),
|
|
249
|
+
}).transform((v) => {
|
|
250
|
+
return remap$(v, {
|
|
251
|
+
"sdk_params": "sdkParams",
|
|
252
|
+
});
|
|
187
253
|
});
|
|
188
254
|
|
|
189
255
|
export function paymentFromJSON(
|
|
@@ -6,19 +6,37 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* The action to be performed. `paymentPage` is the default option that you should select when using hyper-checkout.
|
|
11
|
+
*/
|
|
9
12
|
export const Action = {
|
|
10
13
|
PaymentPage: "paymentPage",
|
|
11
14
|
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* The action to be performed. `paymentPage` is the default option that you should select when using hyper-checkout.
|
|
17
|
+
*/
|
|
12
18
|
export type Action = ClosedEnum<typeof Action>;
|
|
13
19
|
|
|
14
20
|
/**
|
|
15
21
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPayHyperCheckout} - API reference for the JusPayHyperCheckout schema
|
|
16
22
|
*/
|
|
17
23
|
export type JusPayHyperCheckout = {
|
|
24
|
+
/**
|
|
25
|
+
* The slug of the payment provider in Commerce Engine.
|
|
26
|
+
*/
|
|
18
27
|
paymentProviderSlug: string;
|
|
19
28
|
integrationType: "hyper-checkout";
|
|
29
|
+
/**
|
|
30
|
+
* The reference ID of the payment gateway. When provided, payments will always be routed through this gateway.
|
|
31
|
+
*/
|
|
20
32
|
gatewayReferenceId: string;
|
|
33
|
+
/**
|
|
34
|
+
* The URL to which the customer will be redirected after the payment is complete.
|
|
35
|
+
*/
|
|
21
36
|
returnUrl: string;
|
|
37
|
+
/**
|
|
38
|
+
* The action to be performed. `paymentPage` is the default option that you should select when using hyper-checkout.
|
|
39
|
+
*/
|
|
22
40
|
action: Action;
|
|
23
41
|
};
|
|
24
42
|
|
|
@@ -9,12 +9,19 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
9
9
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/JuspayNetBanking} - API reference for the JuspayNetBanking schema
|
|
10
10
|
*/
|
|
11
11
|
export type JuspayNetBanking = {
|
|
12
|
+
/**
|
|
13
|
+
* The slug of the payment provider in Commerce Engine.
|
|
14
|
+
*/
|
|
12
15
|
paymentProviderSlug: string;
|
|
13
16
|
integrationType: "express-checkout";
|
|
17
|
+
/**
|
|
18
|
+
* The reference ID of the payment gateway. When provided, payments will always be routed through this gateway.
|
|
19
|
+
*/
|
|
14
20
|
gatewayReferenceId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The URL to which the customer will be redirected after the payment is complete.
|
|
23
|
+
*/
|
|
15
24
|
returnUrl: string;
|
|
16
|
-
redirectAfterPayment?: boolean | undefined;
|
|
17
|
-
getClientAuthToken?: boolean | undefined;
|
|
18
25
|
paymentMethodType: "NB";
|
|
19
26
|
paymentMethod: string;
|
|
20
27
|
};
|
|
@@ -25,8 +32,6 @@ export type JuspayNetBanking$Outbound = {
|
|
|
25
32
|
integration_type: "express-checkout";
|
|
26
33
|
gateway_reference_id: string;
|
|
27
34
|
return_url: string;
|
|
28
|
-
redirect_after_payment?: boolean | undefined;
|
|
29
|
-
get_client_auth_token?: boolean | undefined;
|
|
30
35
|
payment_method_type: "NB";
|
|
31
36
|
payment_method: string;
|
|
32
37
|
};
|
|
@@ -41,8 +46,6 @@ export const JuspayNetBanking$outboundSchema: z.ZodType<
|
|
|
41
46
|
integrationType: z.literal("express-checkout"),
|
|
42
47
|
gatewayReferenceId: z.string(),
|
|
43
48
|
returnUrl: z.string(),
|
|
44
|
-
redirectAfterPayment: z.boolean().optional(),
|
|
45
|
-
getClientAuthToken: z.boolean().optional(),
|
|
46
49
|
paymentMethodType: z.literal("NB"),
|
|
47
50
|
paymentMethod: z.string(),
|
|
48
51
|
}).transform((v) => {
|
|
@@ -51,8 +54,6 @@ export const JuspayNetBanking$outboundSchema: z.ZodType<
|
|
|
51
54
|
integrationType: "integration_type",
|
|
52
55
|
gatewayReferenceId: "gateway_reference_id",
|
|
53
56
|
returnUrl: "return_url",
|
|
54
|
-
redirectAfterPayment: "redirect_after_payment",
|
|
55
|
-
getClientAuthToken: "get_client_auth_token",
|
|
56
57
|
paymentMethodType: "payment_method_type",
|
|
57
58
|
paymentMethod: "payment_method",
|
|
58
59
|
});
|
|
@@ -4,28 +4,29 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
-
|
|
9
|
-
export const PaymentMethod = {
|
|
10
|
-
Visa: "VISA",
|
|
11
|
-
Master: "MASTER",
|
|
12
|
-
} as const;
|
|
13
|
-
export type PaymentMethod = ClosedEnum<typeof PaymentMethod>;
|
|
14
7
|
|
|
15
8
|
/**
|
|
16
9
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPayNewCard} - API reference for the JusPayNewCard schema
|
|
17
10
|
*/
|
|
18
11
|
export type JusPayNewCard = {
|
|
12
|
+
/**
|
|
13
|
+
* The slug of the payment provider in Commerce Engine.
|
|
14
|
+
*/
|
|
19
15
|
paymentProviderSlug: string;
|
|
20
16
|
integrationType: "express-checkout";
|
|
17
|
+
/**
|
|
18
|
+
* The reference ID of the payment gateway. When provided, payments will always be routed through this gateway.
|
|
19
|
+
*/
|
|
21
20
|
gatewayReferenceId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The URL to which the customer will be redirected after the payment is complete.
|
|
23
|
+
*/
|
|
22
24
|
returnUrl: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Whether to save the card to the locker. If true, the card will be saved to the locker and can be used for future payments as per RBI regulations.
|
|
27
|
+
*/
|
|
26
28
|
saveToLocker: boolean;
|
|
27
29
|
paymentMethodType: "CARD";
|
|
28
|
-
paymentMethod: PaymentMethod;
|
|
29
30
|
cardNumber: string;
|
|
30
31
|
cardExpMonth: string;
|
|
31
32
|
cardExpYear: string;
|
|
@@ -33,23 +34,14 @@ export type JusPayNewCard = {
|
|
|
33
34
|
cardSecurityCode: string;
|
|
34
35
|
};
|
|
35
36
|
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const PaymentMethod$outboundSchema: z.ZodNativeEnum<
|
|
38
|
-
typeof PaymentMethod
|
|
39
|
-
> = z.nativeEnum(PaymentMethod);
|
|
40
|
-
|
|
41
37
|
/** @internal */
|
|
42
38
|
export type JusPayNewCard$Outbound = {
|
|
43
39
|
payment_provider_slug: string;
|
|
44
40
|
integration_type: "express-checkout";
|
|
45
41
|
gateway_reference_id: string;
|
|
46
42
|
return_url: string;
|
|
47
|
-
redirect_after_payment?: boolean | undefined;
|
|
48
|
-
get_client_auth_token?: boolean | undefined;
|
|
49
|
-
auth_type: "OTP";
|
|
50
43
|
save_to_locker: boolean;
|
|
51
44
|
payment_method_type: "CARD";
|
|
52
|
-
payment_method: string;
|
|
53
45
|
card_number: string;
|
|
54
46
|
card_exp_month: string;
|
|
55
47
|
card_exp_year: string;
|
|
@@ -67,12 +59,8 @@ export const JusPayNewCard$outboundSchema: z.ZodType<
|
|
|
67
59
|
integrationType: z.literal("express-checkout"),
|
|
68
60
|
gatewayReferenceId: z.string(),
|
|
69
61
|
returnUrl: z.string(),
|
|
70
|
-
redirectAfterPayment: z.boolean().optional(),
|
|
71
|
-
getClientAuthToken: z.boolean().optional(),
|
|
72
|
-
authType: z.literal("OTP"),
|
|
73
62
|
saveToLocker: z.boolean(),
|
|
74
63
|
paymentMethodType: z.literal("CARD"),
|
|
75
|
-
paymentMethod: PaymentMethod$outboundSchema,
|
|
76
64
|
cardNumber: z.string(),
|
|
77
65
|
cardExpMonth: z.string(),
|
|
78
66
|
cardExpYear: z.string(),
|
|
@@ -84,12 +72,8 @@ export const JusPayNewCard$outboundSchema: z.ZodType<
|
|
|
84
72
|
integrationType: "integration_type",
|
|
85
73
|
gatewayReferenceId: "gateway_reference_id",
|
|
86
74
|
returnUrl: "return_url",
|
|
87
|
-
redirectAfterPayment: "redirect_after_payment",
|
|
88
|
-
getClientAuthToken: "get_client_auth_token",
|
|
89
|
-
authType: "auth_type",
|
|
90
75
|
saveToLocker: "save_to_locker",
|
|
91
76
|
paymentMethodType: "payment_method_type",
|
|
92
|
-
paymentMethod: "payment_method",
|
|
93
77
|
cardNumber: "card_number",
|
|
94
78
|
cardExpMonth: "card_exp_month",
|
|
95
79
|
cardExpYear: "card_exp_year",
|
|
@@ -6,36 +6,64 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Payment method of the card. Please check which payment method is supported by the gateway.
|
|
11
|
+
*/
|
|
12
|
+
export const PaymentMethod = {
|
|
10
13
|
Visa: "VISA",
|
|
11
14
|
Master: "MASTER",
|
|
15
|
+
Rupay: "RUPAY",
|
|
16
|
+
Amex: "AMEX",
|
|
17
|
+
Diners: "DINERS",
|
|
18
|
+
Discover: "DISCOVER",
|
|
19
|
+
Jcb: "JCB",
|
|
20
|
+
Maestro: "MAESTRO",
|
|
12
21
|
} as const;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Payment method of the card. Please check which payment method is supported by the gateway.
|
|
24
|
+
*/
|
|
25
|
+
export type PaymentMethod = ClosedEnum<typeof PaymentMethod>;
|
|
16
26
|
|
|
17
27
|
/**
|
|
18
28
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPaySavedCardToken} - API reference for the JusPaySavedCardToken schema
|
|
19
29
|
*/
|
|
20
30
|
export type JusPaySavedCardToken = {
|
|
31
|
+
/**
|
|
32
|
+
* The slug of the payment provider in Commerce Engine.
|
|
33
|
+
*/
|
|
21
34
|
paymentProviderSlug: string;
|
|
22
35
|
integrationType: "express-checkout";
|
|
36
|
+
/**
|
|
37
|
+
* The reference ID of the payment gateway. When provided, payments will always be routed through this gateway.
|
|
38
|
+
*/
|
|
23
39
|
gatewayReferenceId: string;
|
|
40
|
+
/**
|
|
41
|
+
* The URL to which the customer will be redirected after the payment is complete.
|
|
42
|
+
*/
|
|
24
43
|
returnUrl: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Whether to save the card to the locker. If true, the card will be saved to the locker and can be used for future payments as per RBI regulations.
|
|
46
|
+
*/
|
|
28
47
|
saveToLocker: boolean;
|
|
29
48
|
paymentMethodType: "CARD";
|
|
30
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Payment method of the card. Please check which payment method is supported by the gateway.
|
|
51
|
+
*/
|
|
52
|
+
paymentMethod: PaymentMethod;
|
|
53
|
+
/**
|
|
54
|
+
* Token of the card. This is the token that is used to identify the card in the gateway.
|
|
55
|
+
*/
|
|
31
56
|
cardToken: string;
|
|
57
|
+
/**
|
|
58
|
+
* Security code of the card. This is the security code that is used to identify the card in the gateway.
|
|
59
|
+
*/
|
|
32
60
|
cardSecurityCode: string;
|
|
33
61
|
};
|
|
34
62
|
|
|
35
63
|
/** @internal */
|
|
36
|
-
export const
|
|
37
|
-
typeof
|
|
38
|
-
> = z.nativeEnum(
|
|
64
|
+
export const PaymentMethod$outboundSchema: z.ZodNativeEnum<
|
|
65
|
+
typeof PaymentMethod
|
|
66
|
+
> = z.nativeEnum(PaymentMethod);
|
|
39
67
|
|
|
40
68
|
/** @internal */
|
|
41
69
|
export type JusPaySavedCardToken$Outbound = {
|
|
@@ -43,9 +71,6 @@ export type JusPaySavedCardToken$Outbound = {
|
|
|
43
71
|
integration_type: "express-checkout";
|
|
44
72
|
gateway_reference_id: string;
|
|
45
73
|
return_url: string;
|
|
46
|
-
redirect_after_payment?: boolean | undefined;
|
|
47
|
-
get_client_auth_token?: boolean | undefined;
|
|
48
|
-
auth_type: "OTP";
|
|
49
74
|
save_to_locker: boolean;
|
|
50
75
|
payment_method_type: "CARD";
|
|
51
76
|
payment_method: string;
|
|
@@ -63,12 +88,9 @@ export const JusPaySavedCardToken$outboundSchema: z.ZodType<
|
|
|
63
88
|
integrationType: z.literal("express-checkout"),
|
|
64
89
|
gatewayReferenceId: z.string(),
|
|
65
90
|
returnUrl: z.string(),
|
|
66
|
-
redirectAfterPayment: z.boolean().optional(),
|
|
67
|
-
getClientAuthToken: z.boolean().optional(),
|
|
68
|
-
authType: z.literal("OTP"),
|
|
69
91
|
saveToLocker: z.boolean(),
|
|
70
92
|
paymentMethodType: z.literal("CARD"),
|
|
71
|
-
paymentMethod:
|
|
93
|
+
paymentMethod: PaymentMethod$outboundSchema,
|
|
72
94
|
cardToken: z.string(),
|
|
73
95
|
cardSecurityCode: z.string(),
|
|
74
96
|
}).transform((v) => {
|
|
@@ -77,9 +99,6 @@ export const JusPaySavedCardToken$outboundSchema: z.ZodType<
|
|
|
77
99
|
integrationType: "integration_type",
|
|
78
100
|
gatewayReferenceId: "gateway_reference_id",
|
|
79
101
|
returnUrl: "return_url",
|
|
80
|
-
redirectAfterPayment: "redirect_after_payment",
|
|
81
|
-
getClientAuthToken: "get_client_auth_token",
|
|
82
|
-
authType: "auth_type",
|
|
83
102
|
saveToLocker: "save_to_locker",
|
|
84
103
|
paymentMethodType: "payment_method_type",
|
|
85
104
|
paymentMethod: "payment_method",
|