Skip to content

Commit 9f32fa0

Browse files
authored
EPS:320: creating eps iFrame (#29)
1 parent 1d32940 commit 9f32fa0

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

src/types/apiInterfaces.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ export interface IOrderInitialData {
402402
life_elements: Array<ILifeField>;
403403
flow_settings: Record<string, unknown>;
404404
requires_shipping: boolean;
405+
eps_gateways: IEpsGateways;
405406
}
406407

407408
export interface ISupportedLanguage {
@@ -432,6 +433,14 @@ export interface ICountryInformation {
432433
valid_for_billing: boolean;
433434
}
434435

436+
export interface IEpsGateways {
437+
[gateway_id: string]: IEpsGateway,
438+
}
439+
export interface IEpsGateway {
440+
auth_token: string;
441+
currency: string;
442+
}
443+
435444
export interface ICheckoutProcess{
436445
company_name_option: string,
437446
phone_number_required: boolean,

src/variables/mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ export const orderInitialDataMock: IOrderInitialData = {
359359
life_elements: [],
360360
flow_settings: {},
361361
requires_shipping: true,
362+
eps_gateways: {},
362363
};
363364

364365
export const cssRuleMock: ICssRule = {

src/variables/variables.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
export const environment: Required<IEnvironment> = {
2828
type: environmentTypes.production,
2929
url: environmentUrls.production,
30-
path: environmentPath
30+
path: environmentPath,
3131
};
3232

3333
export const auth: IAuth = {
@@ -192,7 +192,7 @@ export const applicationState: IApplicationState = {
192192
created_via: '',
193193
is_processed: false,
194194
fees,
195-
flow_id: null
195+
flow_id: null,
196196
};
197197

198198
export const orderInitialData: IOrderInitialData = {
@@ -205,6 +205,7 @@ export const orderInitialData: IOrderInitialData = {
205205
life_elements: [],
206206
flow_settings: {},
207207
requires_shipping: true,
208+
eps_gateways: {},
208209
};
209210

210211
export const retryErrorCodeList: Array<number> = [

tests/shipping/changeShippingLineWithCode.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {apiTypeKeys, baseReturnObject, methods, apiTypes, changeShippingLineWithCode, changeShippingLine} from 'src';
1+
import {apiTypeKeys, baseReturnObject, methods, apiTypes, changeShippingLineWithCode} from 'src';
22
import {applicationStateMock, selectShippingLineMock} from 'src/variables/mocks';
33
import * as fetchAPI from 'src/utils/fetchAPI';
44
import * as getApiOptions from 'src/utils/getApiOptions';
@@ -10,7 +10,6 @@ describe('testing set shipping address api', () => {
1010
const timesWhenCalled = 1;
1111
const index = '1';
1212
const code = 'code';
13-
const code1 = '';
1413
const apiUrlMock = 'https://api.com/checkout/storefront/123/123/addresses/shipping';
1514
const {keysToTest} = apiTypes.changeShippingLines;
1615
let optionsMock: RequestInit;

0 commit comments

Comments
 (0)