@kushki/js 1.40.0 → 1.40.1-alpha-19108.0
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/lib/KushkiInfo.js +1 -1
- package/lib/gateway/KushkiGateway.d.ts +1 -1
- package/lib/gateway/KushkiGateway.js +2 -2
- package/lib/infrastructure/EnvironmentEnum.d.ts +1 -1
- package/lib/infrastructure/EnvironmentEnum.js +1 -1
- package/lib/repository/IKushkiGateway.d.ts +2 -1
- package/lib/service/ApplePayService.js +3 -3
- package/package.json +1 -3
package/lib/KushkiInfo.js
CHANGED
|
@@ -12,7 +12,7 @@ const UtilsService_1 = require("./../lib/service/UtilsService");
|
|
|
12
12
|
*/
|
|
13
13
|
class KInfo {
|
|
14
14
|
static buildKushkiInfo(kushkiInfo) {
|
|
15
|
-
const kushki_js_version = "1.40.0";
|
|
15
|
+
const kushki_js_version = "1.40.1-alpha-19108.0";
|
|
16
16
|
if (kushkiInfo) {
|
|
17
17
|
if (UtilsService_1.UtilsService.sIsEmpty(kushkiInfo.platformVersion))
|
|
18
18
|
kushkiInfo.platformVersion = kushki_js_version;
|
|
@@ -78,7 +78,7 @@ export declare class KushkiGateway implements IKushkiGateway {
|
|
|
78
78
|
cybersourceJwt(mid: string, testEnv: boolean, regional: boolean, subscriptionId?: string): Observable<JwtResponse>;
|
|
79
79
|
getUserId(subscriptionId: string, mid: string, testEnv: boolean, regional: boolean): Observable<GetUserId>;
|
|
80
80
|
validateAppleDomain(domain: string, mid: string, testEnv: boolean, regional: boolean): Observable<Validate3DsResponse>;
|
|
81
|
-
startApplePaySession(body: ApplePayStartSessionRequest, testEnv: boolean, regional: boolean): Observable<object>;
|
|
81
|
+
startApplePaySession(body: ApplePayStartSessionRequest, mid: string, testEnv: boolean, regional: boolean): Observable<object>;
|
|
82
82
|
getApplePayToken(body: ApplePayGetTokenRequest, mid: string, testEnv: boolean, regional: boolean): Observable<TokenResponse>;
|
|
83
83
|
private _assignChannel;
|
|
84
84
|
private _buildHeader;
|
|
@@ -171,8 +171,8 @@ let KushkiGateway = KushkiGateway_1 = class KushkiGateway {
|
|
|
171
171
|
validateAppleDomain(domain, mid, testEnv, regional) {
|
|
172
172
|
return rxjs_1.of(1).pipe(operators_1.concatMap(() => this.requestGet(`${PathEnum_1.PathEnum.validate_apple_domain}?domain=${domain}&switch=${this._multiRegionEcommSwitch}`, testEnv, regional, mid)));
|
|
173
173
|
}
|
|
174
|
-
startApplePaySession(body, testEnv, regional) {
|
|
175
|
-
return rxjs_1.of(1).pipe(operators_1.concatMap(() => this.request(body, {}, `${PathEnum_1.PathEnum.start_apple_pay_session}?switch=${this._multiRegionEcommSwitch}`, testEnv, regional)));
|
|
174
|
+
startApplePaySession(body, mid, testEnv, regional) {
|
|
175
|
+
return rxjs_1.of(1).pipe(operators_1.concatMap(() => this.request(body, { [this._publicHeader]: mid }, `${PathEnum_1.PathEnum.start_apple_pay_session}?switch=${this._multiRegionEcommSwitch}`, testEnv, regional)));
|
|
176
176
|
}
|
|
177
177
|
getApplePayToken(body, mid, testEnv, regional) {
|
|
178
178
|
return rxjs_1.of(1).pipe(operators_1.concatMap(() => this.request(body, {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Environment enum file
|
|
4
4
|
*/
|
|
5
5
|
export declare enum EnvironmentEnum {
|
|
6
|
-
uat = "https://
|
|
6
|
+
uat = "https://ecomm-dev-01-us-east-1.kushki.dev/",
|
|
7
7
|
prod = "https://api.kushkipagos.com/",
|
|
8
8
|
regionalUat = "https://regional-uat.kushkipagos.com/",
|
|
9
9
|
regionalProd = "https://regional.kushkipagos.com/"
|
|
@@ -6,7 +6,7 @@ exports.EnvironmentEnum = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
var EnvironmentEnum;
|
|
8
8
|
(function (EnvironmentEnum) {
|
|
9
|
-
EnvironmentEnum["uat"] = "https://
|
|
9
|
+
EnvironmentEnum["uat"] = "https://ecomm-dev-01-us-east-1.kushki.dev/";
|
|
10
10
|
EnvironmentEnum["prod"] = "https://api.kushkipagos.com/";
|
|
11
11
|
EnvironmentEnum["regionalUat"] = "https://regional-uat.kushkipagos.com/";
|
|
12
12
|
EnvironmentEnum["regionalProd"] = "https://regional.kushkipagos.com/";
|
|
@@ -176,10 +176,11 @@ export interface IKushkiGateway {
|
|
|
176
176
|
/**
|
|
177
177
|
* Start Apple Pay Session
|
|
178
178
|
* @param body start session required params
|
|
179
|
+
* @param mid public credential for request
|
|
179
180
|
* @param testEnv - is test environment
|
|
180
181
|
* @param regional - Define if endpoint used regional URL
|
|
181
182
|
*/
|
|
182
|
-
startApplePaySession(body: ApplePayStartSessionRequest, testEnv: boolean, regional: boolean): Observable<object>;
|
|
183
|
+
startApplePaySession(body: ApplePayStartSessionRequest, mid: string, testEnv: boolean, regional: boolean): Observable<object>;
|
|
183
184
|
/**
|
|
184
185
|
* Get Apple Pay Session
|
|
185
186
|
* @param body token required params
|
|
@@ -65,7 +65,7 @@ let ApplePayService = ApplePayService_1 = class ApplePayService {
|
|
|
65
65
|
label: options.displayName,
|
|
66
66
|
} }, options.optionalApplePayFields);
|
|
67
67
|
const session = new window.ApplePaySession(this._getSupportedApplePayVersion(), session_params);
|
|
68
|
-
session.onvalidatemerchant = (event) => this._onValidateMerchant(event, session, options, isTest, regional, callback);
|
|
68
|
+
session.onvalidatemerchant = (event) => this._onValidateMerchant(event, mid, session, options, isTest, regional, callback);
|
|
69
69
|
session.onpaymentauthorized = (event) => this._onPaymentAuthorized(event, mid, session, isTest, regional, callback);
|
|
70
70
|
session.oncancel = () => {
|
|
71
71
|
onCancel();
|
|
@@ -132,7 +132,7 @@ let ApplePayService = ApplePayService_1 = class ApplePayService {
|
|
|
132
132
|
onError(error);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
_onValidateMerchant(event, session, options, isTest, regional, onError) {
|
|
135
|
+
_onValidateMerchant(event, mid, session, options, isTest, regional, onError) {
|
|
136
136
|
return __awaiter(this, void 0, void 0, function* () {
|
|
137
137
|
try {
|
|
138
138
|
const merchant_session = yield this._gateway
|
|
@@ -140,7 +140,7 @@ let ApplePayService = ApplePayService_1 = class ApplePayService {
|
|
|
140
140
|
clientDomain: ApplePayService_1.getClientDomain(),
|
|
141
141
|
displayName: options.displayName,
|
|
142
142
|
validationURL: event.validationURL,
|
|
143
|
-
}, isTest, regional)
|
|
143
|
+
}, mid, isTest, regional)
|
|
144
144
|
.toPromise();
|
|
145
145
|
session.completeMerchantValidation(merchant_session);
|
|
146
146
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kushki/js",
|
|
3
|
-
"version": "1.40.0",
|
|
3
|
+
"version": "1.40.1-alpha-19108.0",
|
|
4
4
|
"description": "kushki-js",
|
|
5
5
|
"main": "lib/lib.js",
|
|
6
6
|
"types": "lib/lib.d.ts",
|
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
],
|
|
12
12
|
"husky": {
|
|
13
13
|
"hooks": {
|
|
14
|
-
"pre-commit": "lint-staged",
|
|
15
|
-
"pre-push": "npm run lint:duplicate && npm run lint:check && npm run test:unit"
|
|
16
14
|
}
|
|
17
15
|
},
|
|
18
16
|
"scripts": {
|