@@ -26,7 +26,7 @@ describe("app switch resume flow", () => {
26
26
27
27
test ( "should test fetching resume params when parameters are correctly passed" , ( ) => {
28
28
vi . spyOn ( window , "location" , "get" ) . mockReturnValue ( {
29
- hash : `#onApprove?buttonSessionID =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } ` ,
29
+ hash : `#onApprove?button_session_id =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } ` ,
30
30
} ) ;
31
31
32
32
const params = getAppSwitchResumeParams ( ) ;
@@ -55,7 +55,7 @@ describe("app switch resume flow", () => {
55
55
56
56
test ( "should test null fetching resume params with invalid callback passed" , ( ) => {
57
57
vi . spyOn ( window , "location" , "get" ) . mockReturnValue ( {
58
- hash : `#Unknown?buttonSessionID =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } ` ,
58
+ hash : `#Unknown?button_session_id =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } ` ,
59
59
} ) ;
60
60
61
61
const params = getAppSwitchResumeParams ( ) ;
@@ -67,7 +67,7 @@ describe("app switch resume flow", () => {
67
67
68
68
test ( "should test fetching multiple resume params when parameters are correctly passed" , ( ) => {
69
69
vi . spyOn ( window , "location" , "get" ) . mockReturnValue ( {
70
- hash : `#onApprove?buttonSessionID =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } &billingToken=BA-124&PayerID=PP-payer-122&paymentID=PAY-123&subscriptionID=I-1234&vaultSetupToken=VA-3` ,
70
+ hash : `#onApprove?button_session_id =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } &billingToken=BA-124&PayerID=PP-payer-122&paymentID=PAY-123&subscriptionID=I-1234&vaultSetupToken=VA-3` ,
71
71
} ) ;
72
72
73
73
const params = getAppSwitchResumeParams ( ) ;
@@ -87,9 +87,9 @@ describe("app switch resume flow", () => {
87
87
expect ( isAppSwitchResumeFlow ( ) ) . toEqual ( true ) ;
88
88
} ) ;
89
89
90
- test ( "should test onApprove resume params when parameters are passed from web fallback" , ( ) => {
90
+ test ( "should test onApprove resume params when parameters are passed from web fallback with vaultSetupToken " , ( ) => {
91
91
vi . spyOn ( window , "location" , "get" ) . mockReturnValue ( {
92
- search : `?buttonSessionID =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } &vaultSetupToken=VA-3&PayerID=PP123456` ,
92
+ search : `?button_session_id =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } &vaultSetupToken=VA-3&PayerID=PP123456` ,
93
93
} ) ;
94
94
95
95
const params = getAppSwitchResumeParams ( ) ;
@@ -106,9 +106,9 @@ describe("app switch resume flow", () => {
106
106
expect ( isAppSwitchResumeFlow ( ) ) . toEqual ( true ) ;
107
107
} ) ;
108
108
109
- test ( "should test onCancel resume params when parameters are passed from web fallback" , ( ) => {
109
+ test ( "should test onCancel resume params when parameters are passed from web fallback with approval_token_id " , ( ) => {
110
110
vi . spyOn ( window , "location" , "get" ) . mockReturnValue ( {
111
- search : `?buttonSessionID =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } &vaultSetupToken =VA-3` ,
111
+ search : `?button_session_id =${ buttonSessionID } &token=${ orderID } &fundingSource=${ fundingSource } &approval_token_id =VA-3` ,
112
112
} ) ;
113
113
114
114
const params = getAppSwitchResumeParams ( ) ;
0 commit comments