@xsolla/payment-client-core 0.2.44 → 0.2.46
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/esm2022/lib/core/agreements-group.const.mjs +17 -0
- package/esm2022/lib/core/extended-window.interface.mjs +1 -1
- package/esm2022/lib/core/payment/actions/action.interface.mjs +1 -1
- package/esm2022/lib/core/payment/actions/next-action.service.mjs +1 -1
- package/esm2022/lib/core/payment/field-names.enum.mjs +4 -1
- package/esm2022/lib/core/payment/field.interface.mjs +1 -1
- package/esm2022/lib/core/payment/finance-details/finance-details.service.mjs +4 -1
- package/esm2022/lib/core/payment/initialize-actions/action.interface.mjs +2 -0
- package/esm2022/lib/core/payment/initialize-actions/initialize-next-action.service.mjs +40 -0
- package/esm2022/lib/core/payment/initialize-actions/initialize-next-actions.mjs +7 -0
- package/esm2022/lib/core/payment/initialize-actions/next-action.interface.mjs +2 -0
- package/esm2022/lib/core/payment/initialize-actions/special-button/special-button.action.class.mjs +46 -0
- package/esm2022/lib/core/payment/initialize-actions/special-button/special-button.action.type.mjs +2 -0
- package/esm2022/lib/core/payment/initialized-form.inteface.mjs +1 -1
- package/esm2022/lib/core/payment/payment.service.mjs +72 -24
- package/esm2022/lib/core/payment/sync/request/sync-request.class.mjs +3 -1
- package/esm2022/lib/core/payment/sync/sync.service.mjs +4 -4
- package/esm2022/lib/core/payment/xps-error.interface.mjs +1 -1
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay-integration.type.mjs +6 -2
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay-params-builder.service.mjs +90 -0
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay-session.interface.mjs +2 -0
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay.errors.enum.mjs +6 -3
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.mjs +64 -87
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/checkout-params.interface.mjs +1 -1
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.mjs +80 -0
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/checkout.handler.mjs +65 -0
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/session-handler.abstract.mjs +31 -0
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/session-handler.type.mjs +2 -0
- package/esm2022/lib/core/sdk-payment-systems/google-pay/check-payment-device-data.interface.mjs +2 -0
- package/esm2022/lib/core/sdk-payment-systems/google-pay/google-pay-init-params.interface.mjs +1 -1
- package/esm2022/lib/core/sdk-payment-systems/google-pay/google-pay-library.interface.mjs +1 -1
- package/esm2022/lib/core/sdk-payment-systems/google-pay/google-pay.service.mjs +70 -59
- package/esm2022/lib/core/sdk-payment-systems/google-pay/payment/google-pay-checkout-payment.service.mjs +75 -0
- package/esm2022/lib/core/sdk-payment-systems/google-pay/payment/google-pay-instant-payment.service.mjs +121 -0
- package/esm2022/lib/core/sdk-payment-systems/google-pay/payment/google-pay-payment-service.interface.mjs +2 -0
- package/esm2022/lib/core/sdk-payment-systems/google-pay/updated-price.interface.mjs +2 -0
- package/esm2022/lib/core/sdk-payment-systems/sdk-payment-systems-initial-data.interface.mjs +1 -1
- package/esm2022/lib/core/sdk-payment-systems/sdk-payment-systems.interface.mjs +1 -1
- package/esm2022/lib/core/settings/project.interface.mjs +1 -1
- package/esm2022/lib/core-library.module.mjs +18 -1
- package/esm2022/lib/core-library.service.mjs +16 -2
- package/fesm2022/xsolla-payment-client-core.mjs +920 -336
- package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/extended-window.interface.d.ts +1 -1
- package/lib/core/payment/actions/action.interface.d.ts +2 -2
- package/lib/core/payment/actions/next-action.service.d.ts +1 -1
- package/lib/core/payment/actions/next-actions.d.ts +1 -1
- package/lib/core/payment/field-names.enum.d.ts +4 -1
- package/lib/core/payment/field.interface.d.ts +1 -1
- package/lib/core/payment/finance-details/finance-details.service.d.ts +1 -0
- package/lib/core/payment/initialize-actions/action.interface.d.ts +11 -0
- package/lib/core/payment/initialize-actions/initialize-next-action.service.d.ts +16 -0
- package/lib/core/payment/initialize-actions/initialize-next-actions.d.ts +5 -0
- package/lib/core/payment/initialize-actions/next-action.interface.d.ts +2 -0
- package/lib/core/payment/initialize-actions/special-button/special-button.action.class.d.ts +17 -0
- package/lib/core/payment/initialize-actions/special-button/special-button.action.type.d.ts +6 -0
- package/lib/core/payment/initialized-form.inteface.d.ts +2 -0
- package/lib/core/payment/payment.service.d.ts +11 -2
- package/lib/core/payment/sync/sync.service.d.ts +1 -1
- package/lib/core/payment/xps-error.interface.d.ts +1 -0
- package/lib/core/sdk-payment-systems/apple-pay/apple-pay-integration.type.d.ts +5 -1
- package/lib/core/sdk-payment-systems/apple-pay/apple-pay-params-builder.service.d.ts +15 -0
- package/lib/core/sdk-payment-systems/apple-pay/apple-pay-session.interface.d.ts +135 -0
- package/lib/core/sdk-payment-systems/apple-pay/apple-pay.errors.enum.d.ts +5 -2
- package/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.d.ts +24 -13
- package/lib/core/sdk-payment-systems/apple-pay/checkout-params.interface.d.ts +1 -0
- package/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.d.ts +16 -0
- package/lib/core/sdk-payment-systems/apple-pay/session-handlers/checkout.handler.d.ts +13 -0
- package/lib/core/sdk-payment-systems/apple-pay/session-handlers/session-handler.abstract.d.ts +13 -0
- package/lib/core/sdk-payment-systems/apple-pay/session-handlers/session-handler.type.d.ts +3 -0
- package/lib/core/sdk-payment-systems/google-pay/check-payment-device-data.interface.d.ts +9 -0
- package/lib/core/sdk-payment-systems/google-pay/google-pay-init-params.interface.d.ts +6 -0
- package/lib/core/sdk-payment-systems/google-pay/google-pay-library.interface.d.ts +170 -52
- package/lib/core/sdk-payment-systems/google-pay/google-pay.service.d.ts +18 -10
- package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-checkout-payment.service.d.ts +18 -0
- package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-instant-payment.service.d.ts +18 -0
- package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-payment-service.interface.d.ts +14 -0
- package/lib/core/sdk-payment-systems/google-pay/updated-price.interface.d.ts +7 -0
- package/lib/core/sdk-payment-systems/sdk-payment-systems-initial-data.interface.d.ts +7 -1
- package/lib/core/sdk-payment-systems/sdk-payment-systems.interface.d.ts +1 -1
- package/lib/core/settings/project.interface.d.ts +1 -0
- package/lib/core-library.service.d.ts +12 -0
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.2.46.tgz +0 -0
- package/esm2022/lib/core/agreementsGroup.const.mjs +0 -17
- package/xsolla-payment-client-core-0.2.44.tgz +0 -0
- /package/lib/core/{agreementsGroup.const.d.ts → agreements-group.const.d.ts} +0 -0
|
@@ -1,18 +1,163 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
type ApiVersion = number;
|
|
2
|
+
type ApiVersionMinor = number;
|
|
3
|
+
interface Address {
|
|
4
|
+
name: string;
|
|
5
|
+
address1: string;
|
|
6
|
+
address2: string;
|
|
7
|
+
address3: string;
|
|
8
|
+
locality: string;
|
|
9
|
+
administrativeArea: string;
|
|
10
|
+
countryCode: string;
|
|
11
|
+
postalCode: string;
|
|
12
|
+
sortingCode: string;
|
|
13
|
+
}
|
|
14
|
+
export type DisplayItems = Array<{
|
|
15
|
+
label: string;
|
|
16
|
+
type: string;
|
|
17
|
+
price: string;
|
|
18
|
+
}>;
|
|
19
|
+
export interface TransactionInfo {
|
|
20
|
+
currencyCode?: string;
|
|
21
|
+
totalPriceStatus: string;
|
|
22
|
+
totalPrice?: number | string;
|
|
23
|
+
countryCode?: string;
|
|
24
|
+
totalPriceLabel?: string;
|
|
25
|
+
displayItems?: DisplayItems;
|
|
26
|
+
}
|
|
27
|
+
export interface AllowedPaymentMethod {
|
|
28
|
+
type: string;
|
|
29
|
+
parameters: {
|
|
30
|
+
allowedAuthMethods: string[];
|
|
31
|
+
allowedCardNetworks: string[];
|
|
32
|
+
allowPrepaidCards: boolean;
|
|
33
|
+
billingAddressRequired: boolean;
|
|
34
|
+
billingAddressParameters: {
|
|
35
|
+
format: string;
|
|
36
|
+
phoneNumberRequired: boolean;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
tokenizationSpecification: {
|
|
40
|
+
type: string;
|
|
41
|
+
parameters: {
|
|
42
|
+
gateway: string;
|
|
43
|
+
'vantiv:merchantPayPageId'?: string;
|
|
44
|
+
'vantiv:merchantOrderId'?: string;
|
|
45
|
+
'vantiv:merchantTransactionId'?: string;
|
|
46
|
+
'vantiv:merchantReportGroup'?: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface IsReadyToPayRequest {
|
|
51
|
+
apiVersion: ApiVersion;
|
|
52
|
+
apiVersionMinor: ApiVersionMinor;
|
|
53
|
+
allowedPaymentMethods: AllowedPaymentMethod[];
|
|
54
|
+
}
|
|
55
|
+
export interface GooglePayPaymentRequest {
|
|
56
|
+
apiVersion: ApiVersion;
|
|
57
|
+
apiVersionMinor: ApiVersionMinor;
|
|
58
|
+
merchantInfo: {
|
|
59
|
+
merchantId: string;
|
|
60
|
+
};
|
|
61
|
+
allowedPaymentMethods: AllowedPaymentMethod[];
|
|
62
|
+
transactionInfo: TransactionInfo;
|
|
63
|
+
emailRequired: boolean;
|
|
64
|
+
shippingAddressRequired: boolean;
|
|
65
|
+
callbackIntents: string[];
|
|
66
|
+
}
|
|
67
|
+
export interface PaymentAuthorizationResult {
|
|
68
|
+
transactionState: 'SUCCESS' | 'ERROR';
|
|
69
|
+
error?: {
|
|
70
|
+
reason: string;
|
|
71
|
+
message: string;
|
|
72
|
+
intent: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export interface PaymentData {
|
|
76
|
+
apiVersion: number;
|
|
77
|
+
apiVersionMinor: number;
|
|
78
|
+
paymentMethodData: {
|
|
79
|
+
type: string;
|
|
80
|
+
description: string;
|
|
81
|
+
info: {
|
|
82
|
+
cardDetails: string;
|
|
83
|
+
assuranceDetails: {
|
|
84
|
+
accountVerified: boolean;
|
|
85
|
+
cardHolderAuthenticated: boolean;
|
|
86
|
+
};
|
|
87
|
+
cardNetwork: string;
|
|
88
|
+
billingAddress?: Address;
|
|
89
|
+
};
|
|
90
|
+
tokenizationData: {
|
|
91
|
+
type: string;
|
|
92
|
+
token?: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
email?: string;
|
|
96
|
+
shippingAddress?: Address;
|
|
97
|
+
}
|
|
98
|
+
export interface PaymentDataRequestUpdate {
|
|
99
|
+
newTransactionInfo?: {
|
|
100
|
+
displayItems?: Array<{
|
|
101
|
+
label: string;
|
|
102
|
+
type: string;
|
|
103
|
+
price: string;
|
|
104
|
+
}>;
|
|
105
|
+
currencyCode: string;
|
|
106
|
+
countryCode?: string;
|
|
107
|
+
transactionId?: string;
|
|
108
|
+
totalPriceStatus: string;
|
|
109
|
+
totalPrice: string;
|
|
110
|
+
totalPriceLabel?: string;
|
|
111
|
+
checkoutOption?: string;
|
|
112
|
+
};
|
|
113
|
+
newShippingOptionParameters?: {
|
|
114
|
+
defaultSelectedOptionId: string;
|
|
115
|
+
shippingOptions?: Array<{
|
|
116
|
+
id: string;
|
|
117
|
+
label: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
}>;
|
|
120
|
+
};
|
|
121
|
+
newOfferInfo?: {
|
|
122
|
+
offers: Array<{
|
|
123
|
+
redemptionCode: string;
|
|
124
|
+
description: string;
|
|
125
|
+
}>;
|
|
126
|
+
};
|
|
127
|
+
error?: {
|
|
128
|
+
reason: string;
|
|
129
|
+
message: string;
|
|
130
|
+
intent: string;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export interface GoogleInitData {
|
|
134
|
+
isReadyToPayRequest: IsReadyToPayRequest;
|
|
135
|
+
paymentDataRequest: GooglePayPaymentRequest;
|
|
136
|
+
amexCardNotification?: string;
|
|
137
|
+
}
|
|
138
|
+
export interface IntermediatePaymentData {
|
|
139
|
+
callbackTrigger?: 'INITIALIZE' | 'SHIPPING_ADDRESS' | 'SHIPPING_OPTION';
|
|
140
|
+
shippingAddress?: {
|
|
141
|
+
administrativeArea: string;
|
|
142
|
+
countryCode: string;
|
|
143
|
+
locality: string;
|
|
144
|
+
postalCode: string;
|
|
145
|
+
};
|
|
146
|
+
shippingOptionData?: {
|
|
147
|
+
id: string;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
export type PaymentDataChangedHandler = (intermediatePaymentData: IntermediatePaymentData) => Promise<PaymentDataRequestUpdate>;
|
|
151
|
+
export type PaymentAuthorizedHandler = (paymentData: PaymentData) => Promise<PaymentAuthorizationResult>;
|
|
152
|
+
export interface GooglePayClientInitData {
|
|
153
|
+
environment: string;
|
|
154
|
+
paymentDataCallbacks?: {
|
|
155
|
+
onPaymentDataChanged: PaymentDataChangedHandler;
|
|
156
|
+
onPaymentAuthorized: PaymentAuthorizedHandler;
|
|
157
|
+
};
|
|
11
158
|
}
|
|
12
159
|
export interface GooglePayClientInit {
|
|
13
|
-
new (options:
|
|
14
|
-
environment: string;
|
|
15
|
-
}): GooglePayClient;
|
|
160
|
+
new (options: GooglePayClientInitData): GooglePayClient;
|
|
16
161
|
}
|
|
17
162
|
export interface PaymentDataRequest {
|
|
18
163
|
transactionInfo: {
|
|
@@ -30,7 +175,7 @@ export interface PaymentDataResponse {
|
|
|
30
175
|
}
|
|
31
176
|
export interface ButtonOptions {
|
|
32
177
|
onClick(): void;
|
|
33
|
-
allowedPaymentMethods:
|
|
178
|
+
allowedPaymentMethods: AllowedPaymentMethod[];
|
|
34
179
|
buttonColor?: 'default' | 'black' | 'white';
|
|
35
180
|
buttonType?: 'plain' | 'buy';
|
|
36
181
|
buttonSizeMode?: 'static' | 'fill';
|
|
@@ -42,42 +187,15 @@ export interface GooglePayLibrary {
|
|
|
42
187
|
};
|
|
43
188
|
};
|
|
44
189
|
}
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
tokenizationSpecification: {
|
|
58
|
-
type: string;
|
|
59
|
-
parameters: {
|
|
60
|
-
gateway: 'vantiv';
|
|
61
|
-
'vantiv:merchantPayPageId': string;
|
|
62
|
-
'vantiv:merchantOrderId': string;
|
|
63
|
-
'vantiv:merchantTransactionId': string;
|
|
64
|
-
'vantiv:merchantReportGroup': string;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export interface GooglePayPaymentRequest {
|
|
69
|
-
apiVersion: number;
|
|
70
|
-
apiVersionMinor: number;
|
|
71
|
-
merchantInfo: {
|
|
72
|
-
merchantId: string;
|
|
73
|
-
};
|
|
74
|
-
allowedPaymentMethods: GooglePayPaymentMethod[];
|
|
75
|
-
transactionInfo: {
|
|
76
|
-
currencyCode: string;
|
|
77
|
-
totalPriceStatus: string;
|
|
78
|
-
totalPrice: string;
|
|
79
|
-
countryCode: string;
|
|
80
|
-
};
|
|
81
|
-
emailRequired: boolean;
|
|
82
|
-
shippingAddressRequired: boolean;
|
|
190
|
+
export declare class GooglePayClient {
|
|
191
|
+
constructor(options: {
|
|
192
|
+
environment: string;
|
|
193
|
+
});
|
|
194
|
+
isReadyToPay(isReadyToPayRequest: IsReadyToPayRequest): Promise<{
|
|
195
|
+
result: boolean;
|
|
196
|
+
}>;
|
|
197
|
+
createButton(options: ButtonOptions): HTMLButtonElement;
|
|
198
|
+
loadPaymentData(paymentDataRequest: GooglePayPaymentRequest): Promise<PaymentDataResponse>;
|
|
199
|
+
prefetchPaymentData(paymentDataRequest: GooglePayPaymentRequest): void;
|
|
83
200
|
}
|
|
201
|
+
export {};
|
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { ElkLoggerService } from '../../exceptions-handling/elk/elk-logger.service';
|
|
4
4
|
import { ExtendedWindow } from '../../extended-window.interface';
|
|
5
|
-
import { GooglePayInitParams } from './google-pay-init-params.interface';
|
|
6
5
|
import { CheckStatusAction } from '../../payment/actions/check-status/check-status.action.type';
|
|
6
|
+
import { PaymentSystemProcessingService } from '../payment-systems/payment-system-processing.service';
|
|
7
|
+
import { CheckPaymentDeviceData } from './check-payment-device-data.interface';
|
|
7
8
|
import { GooglePayButtonColorType } from './google-pay-button-color.type';
|
|
9
|
+
import { GooglePayInitParams } from './google-pay-init-params.interface';
|
|
10
|
+
import { GooglePayCheckoutPaymentService } from './payment/google-pay-checkout-payment.service';
|
|
11
|
+
import { GooglePayInstantPaymentService } from './payment/google-pay-instant-payment.service';
|
|
8
12
|
import * as i0 from "@angular/core";
|
|
9
13
|
export declare class GooglePayService {
|
|
10
14
|
private readonly window;
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
15
|
+
private readonly elkLoggerService;
|
|
16
|
+
private readonly paymentSystemProcessingService;
|
|
17
|
+
private readonly googlePayCheckoutPaymentService;
|
|
18
|
+
private readonly googlePayInstantPaymentService;
|
|
19
|
+
private readonly injector;
|
|
13
20
|
private readonly googlePayScriptUrl;
|
|
14
21
|
private readonly readyToPay;
|
|
15
|
-
private checkout;
|
|
16
22
|
private googlePaymentClient;
|
|
17
|
-
private
|
|
18
|
-
private
|
|
23
|
+
private initParams;
|
|
24
|
+
private paymentService;
|
|
25
|
+
private onPaymentDataChanged;
|
|
26
|
+
private onPaymentAuthorized;
|
|
19
27
|
private get libraryWasInitialized();
|
|
20
28
|
private get googlePaymentClientWasInitialized();
|
|
21
|
-
constructor(window: ExtendedWindow, paymentSystemProcessingService: PaymentSystemProcessingService, injector: Injector);
|
|
29
|
+
constructor(window: ExtendedWindow, elkLoggerService: ElkLoggerService, paymentSystemProcessingService: PaymentSystemProcessingService, googlePayCheckoutPaymentService: GooglePayCheckoutPaymentService, googlePayInstantPaymentService: GooglePayInstantPaymentService, injector: Injector);
|
|
22
30
|
get readyToPay$(): Observable<boolean | null>;
|
|
23
31
|
isReadyToPay(): boolean | null;
|
|
24
32
|
initGooglePayLibrary(data: GooglePayInitParams): void;
|
|
25
|
-
checkPaymentDevice(
|
|
33
|
+
checkPaymentDevice(data: CheckPaymentDeviceData): void;
|
|
26
34
|
proceedCheckout(): Promise<CheckStatusAction | null>;
|
|
27
35
|
createButton(onClickHandler: () => void, buttonColor?: GooglePayButtonColorType): HTMLButtonElement | null;
|
|
28
36
|
private setupGooglePayClient;
|
|
29
37
|
private onLoadScript;
|
|
30
|
-
private
|
|
38
|
+
private getPaymentService;
|
|
31
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayService, never>;
|
|
32
40
|
static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayService>;
|
|
33
41
|
}
|
package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-checkout-payment.service.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PaymentSystemProcessingService } from '../../payment-systems/payment-system-processing.service';
|
|
2
|
+
import { AllowedPaymentMethod, GoogleInitData, GooglePayPaymentRequest, PaymentDataResponse } from '../google-pay-library.interface';
|
|
3
|
+
import { GooglePayPaymentService, PreparePaymentParams } from './google-pay-payment-service.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class GooglePayCheckoutPaymentService implements GooglePayPaymentService {
|
|
6
|
+
readonly paymentSystemProcessingService: PaymentSystemProcessingService;
|
|
7
|
+
private initParams;
|
|
8
|
+
private checkout;
|
|
9
|
+
constructor(paymentSystemProcessingService: PaymentSystemProcessingService);
|
|
10
|
+
preparePayment({ initParams, checkDeviceData, }: PreparePaymentParams): GoogleInitData | null;
|
|
11
|
+
getPaymentRequest(): GooglePayPaymentRequest | null;
|
|
12
|
+
getAllowedPaymentMethods(): AllowedPaymentMethod[];
|
|
13
|
+
handleSuccessfulPayment(response: PaymentDataResponse): void;
|
|
14
|
+
handleFailedPayment(error: unknown): void;
|
|
15
|
+
private isCancelledStatus;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayCheckoutPaymentService, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayCheckoutPaymentService>;
|
|
18
|
+
}
|
package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-instant-payment.service.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SummaryFinanceDetailsAdapterService } from '../../../payment/finance-details/summary/summary-finance-details-adapter.service';
|
|
2
|
+
import { AllowedPaymentMethod, GoogleInitData, GooglePayPaymentRequest } from '../google-pay-library.interface';
|
|
3
|
+
import { GooglePayPaymentService, PreparePaymentParams } from './google-pay-payment-service.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class GooglePayInstantPaymentService implements GooglePayPaymentService {
|
|
6
|
+
private readonly summaryFinanceDetailsAdapterService;
|
|
7
|
+
private initParams;
|
|
8
|
+
private googleInitData;
|
|
9
|
+
constructor(summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService);
|
|
10
|
+
preparePayment({ initParams, checkDeviceData, }: PreparePaymentParams): GoogleInitData | null;
|
|
11
|
+
getPaymentRequest(): GooglePayPaymentRequest | null;
|
|
12
|
+
getAllowedPaymentMethods(): AllowedPaymentMethod[];
|
|
13
|
+
private extractGoogleInitData;
|
|
14
|
+
private getItemsTaxes;
|
|
15
|
+
private getTotalAmount;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayInstantPaymentService, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayInstantPaymentService>;
|
|
18
|
+
}
|
package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-payment-service.interface.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CheckPaymentDeviceData } from '../check-payment-device-data.interface';
|
|
2
|
+
import { GooglePayInitParams } from '../google-pay-init-params.interface';
|
|
3
|
+
import { AllowedPaymentMethod, GoogleInitData, GooglePayPaymentRequest, PaymentDataResponse } from '../google-pay-library.interface';
|
|
4
|
+
export interface PreparePaymentParams {
|
|
5
|
+
initParams: GooglePayInitParams;
|
|
6
|
+
checkDeviceData: CheckPaymentDeviceData;
|
|
7
|
+
}
|
|
8
|
+
export interface GooglePayPaymentService {
|
|
9
|
+
preparePayment(params: PreparePaymentParams): GoogleInitData | null;
|
|
10
|
+
getPaymentRequest(): GooglePayPaymentRequest | null;
|
|
11
|
+
getAllowedPaymentMethods(): AllowedPaymentMethod[];
|
|
12
|
+
handleSuccessfulPayment?(response: PaymentDataResponse): void;
|
|
13
|
+
handleFailedPayment?(error: unknown): void;
|
|
14
|
+
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { Field } from '../payment/field.interface';
|
|
2
|
+
import { SubmitResponse } from '../payment/submit/response/submit-response.class';
|
|
3
|
+
import { XpsSummary } from '../payment/xps-summary.interface';
|
|
1
4
|
import { XpsBoolean } from '../xps-boolean.enum';
|
|
2
5
|
export interface SdkPaymentSystemsInitialData {
|
|
3
|
-
data: string;
|
|
4
6
|
sandbox: XpsBoolean;
|
|
5
7
|
country: string;
|
|
8
|
+
fields: Field[];
|
|
9
|
+
summary: XpsSummary | null;
|
|
10
|
+
submitResponse: SubmitResponse | null;
|
|
11
|
+
data: string | null;
|
|
6
12
|
}
|
|
@@ -10,6 +10,7 @@ import { UserBalanceService } from './core/user-balance/user-balance.service';
|
|
|
10
10
|
import { PaymentConfiguration } from './core/payment/payment-configuration.interface';
|
|
11
11
|
import { PaymentService } from './core/payment/payment.service';
|
|
12
12
|
import { Payment } from './core/payment/payment.interface';
|
|
13
|
+
import { Field } from './core/payment/field.interface';
|
|
13
14
|
import { DeviceFingerPrintService } from './core/device-finger-print/device-finger-print.service';
|
|
14
15
|
import { LegalService } from './core/legal/legal.service';
|
|
15
16
|
import { LegalComponentConfig } from './core/legal/legal.component.config';
|
|
@@ -44,6 +45,11 @@ import { SendInstructionService } from './core/xsolla-number/api/send-instructio
|
|
|
44
45
|
import { SendInstructionResponseInterface } from './core/xsolla-number/api/send-instruction/response/send-instruction-response.interface';
|
|
45
46
|
import { SendInstructionParametersInterface } from './core/xsolla-number/api/send-instruction/send-instruction-parameters.interface';
|
|
46
47
|
import { ScriptTrackerService } from './core/script-tracker/script-tracker.service';
|
|
48
|
+
import { SyncResponse } from './core/payment/sync/response/sync-response.class';
|
|
49
|
+
import { XpsSummary } from './core/payment/xps-summary.interface';
|
|
50
|
+
import { SubmitResponse } from './core/payment/submit/response/submit-response.class';
|
|
51
|
+
import { DeepReadonly } from './core/deep-readonly.type';
|
|
52
|
+
import { Project } from './core/settings/project.interface';
|
|
47
53
|
import * as i0 from "@angular/core";
|
|
48
54
|
export declare class CoreLibraryService {
|
|
49
55
|
private readonly settingsService;
|
|
@@ -77,9 +83,14 @@ export declare class CoreLibraryService {
|
|
|
77
83
|
deleteSavedMethod: (id: number, type: string) => Promise<boolean>;
|
|
78
84
|
};
|
|
79
85
|
sdkPaymentSystems: SdkPaymentSystems;
|
|
86
|
+
finance: {
|
|
87
|
+
getDetailsFromSummary: (summary: XpsSummary) => FinanceDetails;
|
|
88
|
+
};
|
|
80
89
|
constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService, creditCardService: CreditCardService, creditCardStateService: CreditCardStateService, formMessagesService: FormMessagesService, editSavedMethodsService: EditSavedMethodsService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService, performanceService: PerformanceService, combinedPaymentMethodsService: CombinedPaymentMethodsService, countriesApiService: CountriesApiService, sendInstructionService: SendInstructionService, scriptTrackerService: ScriptTrackerService);
|
|
81
90
|
init(configuration: InitConfiguration): Promise<void>;
|
|
82
91
|
getStatus(url?: string): Promise<Status>;
|
|
92
|
+
calculateField(changedField: Field, fields: Field[]): Promise<SyncResponse>;
|
|
93
|
+
submit(fields: Field[]): Promise<SubmitResponse>;
|
|
83
94
|
sendAnalytics(action: string, type: keyof typeof userBehaviourEventTypes, options?: SendEventMethodOptionsInterface): void;
|
|
84
95
|
getQrCodeInitialData(): {
|
|
85
96
|
qrCode: string;
|
|
@@ -101,6 +112,7 @@ export declare class CoreLibraryService {
|
|
|
101
112
|
get paymentForm$(): Observable<FormControlStatus | null>;
|
|
102
113
|
get formResponse$(): Observable<FormResponse | null>;
|
|
103
114
|
get formResponseValue(): FormResponse | null;
|
|
115
|
+
get projectSettings(): DeepReadonly<Project>;
|
|
104
116
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryService, never>;
|
|
105
117
|
static ɵprov: i0.ɵɵInjectableDeclaration<CoreLibraryService>;
|
|
106
118
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FieldNames } from './payment/field-names.enum';
|
|
2
|
-
export const agreementsGroup = [
|
|
3
|
-
FieldNames.licenseDisclaimer,
|
|
4
|
-
FieldNames.termsAndConditions,
|
|
5
|
-
FieldNames.termsAndConditionsHtcEula,
|
|
6
|
-
FieldNames.termsAndConditionsAtariTc,
|
|
7
|
-
FieldNames.termsAndConditionsAtariPp,
|
|
8
|
-
FieldNames.termsAndConditionsRolandEula,
|
|
9
|
-
FieldNames.termsAndConditionsRobloxEula,
|
|
10
|
-
FieldNames.termsAndConditionsDeusLoVultEula,
|
|
11
|
-
FieldNames.termsAndConditionsOnzenga,
|
|
12
|
-
FieldNames.take2Taxes,
|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