File tree 6 files changed +13
-13
lines changed
6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import type {
17
17
ThreeDSResponse ,
18
18
TDSProps ,
19
19
} from "./types" ;
20
- import { getFastlaneThreeDS } from "./utils" ;
20
+ import { getThreeDS } from "./utils" ;
21
21
import type { GraphQLClient , RestClient } from "./api" ;
22
22
23
23
const parseSdkConfig = ( { sdkConfig, logger } ) : SdkConfig => {
@@ -110,7 +110,7 @@ export class ThreeDomainSecureComponent {
110
110
( link ) => link . rel === "payer-action"
111
111
) . href ;
112
112
responseStatus = true ;
113
- this . threeDSIframe = getFastlaneThreeDS ( ) ;
113
+ this . threeDSIframe = getThreeDS ( ) ;
114
114
}
115
115
return responseStatus ;
116
116
} catch ( error ) {
@@ -151,7 +151,7 @@ export class ThreeDomainSecureComponent {
151
151
// Helios returns a boolen parameter: "success"
152
152
// It will be true for all cases where liability is shifted to merchant
153
153
// and false for downstream failures and errors
154
- authenticationState = success ? "success " : "errored" ;
154
+ authenticationState = success ? "succeeded " : "errored" ;
155
155
liabilityShift = liability_shift ? liability_shift : "false" ;
156
156
157
157
// call BT mutation to update fastlaneNonce with 3ds data
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const defaultSdkConfig = {
12
12
authenticationToken : "sdk-client-token" ,
13
13
} ;
14
14
vi . mock ( "./utils" , ( ) => ( {
15
- getFastlaneThreeDS : vi . fn ( ( ) => {
15
+ getThreeDS : vi . fn ( ( ) => {
16
16
return vi . fn ( ( ) => ( {
17
17
render : vi . fn ( ) . mockResolvedValue ( { } ) ,
18
18
close : vi . fn ( ) ,
Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ import {
16
16
type ThreeDomainSecureComponentInterface ,
17
17
} from "./component" ;
18
18
import { GraphQLClient , RestClient } from "./api" ;
19
- import { getFastlaneThreeDS } from "./utils" ;
19
+ import { getThreeDS } from "./utils" ;
20
20
21
21
const BRAINTREE_PROD = "https://payments.braintree-api.com" ;
22
22
const BRAINTREE_SANDBOX = "https://payments.sandbox.braintree-api.com" ;
23
23
24
24
export function setup ( ) {
25
- getFastlaneThreeDS ( ) ;
25
+ getThreeDS ( ) ;
26
26
}
27
27
export function destroy ( err ?: mixed ) {
28
28
zoidDestroy ( err ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { destroy as zoidDestroy } from "@krakenjs/zoid/src";
11
11
12
12
import { ThreeDomainSecureComponent } from "./component" ;
13
13
import { GraphQLClient , RestClient } from "./api" ;
14
- import { getFastlaneThreeDS } from "./utils" ;
14
+ import { getThreeDS } from "./utils" ;
15
15
import { setup , destroy , ThreeDomainSecureClient } from "./interface" ;
16
16
17
17
vi . mock ( "@paypal/sdk-client/src" ) ;
@@ -23,7 +23,7 @@ vi.mock("./utils");
23
23
describe ( "ThreeDomainSecure interface" , ( ) => {
24
24
it ( "should setup and destroy" , ( ) => {
25
25
setup ( ) ;
26
- expect ( getFastlaneThreeDS ) . toHaveBeenCalledTimes ( 1 ) ;
26
+ expect ( getThreeDS ) . toHaveBeenCalledTimes ( 1 ) ;
27
27
28
28
const err = new Error ( "test error" ) ;
29
29
destroy ( err ) ;
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ import type { TDSProps } from "./types";
18
18
19
19
export type TDSComponent = ZoidComponent < TDSProps > ;
20
20
21
- export function getFastlaneThreeDS ( ) : TDSComponent {
22
- return inlineMemoize ( getFastlaneThreeDS , ( ) => {
21
+ export function getThreeDS ( ) : TDSComponent {
22
+ return inlineMemoize ( getThreeDS , ( ) => {
23
23
const component = create ( {
24
24
tag : "fastlane-threeds" ,
25
25
url : ( { props } ) => props . payerActionUrl ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { noop } from "@krakenjs/belter/src";
6
6
import { describe , expect , vi } from "vitest" ;
7
7
import { getEnv } from "@paypal/sdk-client/src" ;
8
8
9
- import { getFastlaneThreeDS } from "./utils" ;
9
+ import { getThreeDS } from "./utils" ;
10
10
11
11
vi . mock ( "@paypal/sdk-client/src" ) ;
12
12
@@ -27,7 +27,7 @@ describe("Three Domain Secure Utils", () => {
27
27
type : "zoidComponent" ,
28
28
} ) ) ;
29
29
30
- const fastlaneComponent = getFastlaneThreeDS ( ) ;
30
+ const fastlaneComponent = getThreeDS ( ) ;
31
31
expect ( fastlaneComponent ) . toBeDefined ( ) ;
32
32
// expect(createMock).toHaveBeenCalledTimes(1);
33
33
} ) ;
@@ -43,7 +43,7 @@ describe("Three Domain Secure Utils", () => {
43
43
type : "zoidComponent" ,
44
44
} ) ) ;
45
45
46
- getFastlaneThreeDS ( ) ;
46
+ getThreeDS ( ) ;
47
47
48
48
expect ( window . xchild ) . toBeDefined ( ) ;
49
49
expect ( window . xchild ) . toEqual ( {
You can’t perform that action at this time.
0 commit comments