@@ -3,10 +3,10 @@ import {createClient} from "../__mocks__/base";
3
3
import { paymentMethodsSuccess } from "../__mocks__/checkout/paymentMethodsSuccess" ;
4
4
import { paymentsSuccess } from "../__mocks__/checkout/paymentsSuccess" ;
5
5
import { paymentDetailsSuccess } from "../__mocks__/checkout/paymentsDetailsSuccess" ;
6
- import { paymentSessionSuccess } from "../__mocks__/checkout/paymentSessionSucess" ;
6
+ // import {paymentSessionSuccess} from "../__mocks__/checkout/paymentSessionSucess";
7
7
import { originKeysSuccess } from "../__mocks__/checkout/originkeysSuccess" ;
8
8
import { paymentsResultMultibancoSuccess } from "../__mocks__/checkout/paymentsResultMultibancoSuccess" ;
9
- import { paymentsResultSuccess } from "../__mocks__/checkout/paymentsResultSucess" ;
9
+ // import {paymentsResultSuccess} from "../__mocks__/checkout/paymentsResultSucess";
10
10
import { sessionsSuccess } from "../__mocks__/checkout/sessionsSuccess" ;
11
11
import Client from "../client" ;
12
12
import { CheckoutAPI } from "../services" ;
@@ -54,17 +54,17 @@ export function createPaymentsCheckoutRequest(): checkout.PaymentRequest {
54
54
} ;
55
55
}
56
56
57
- function createPaymentSessionRequest ( ) : checkout . PaymentSetupRequest {
58
- return {
59
- amount : createAmountObject ( "USD" , 1000 ) ,
60
- countryCode : "NL" ,
61
- merchantAccount,
62
- reference,
63
- returnUrl : "https://your-company.com/..." ,
64
- channel : checkout . PaymentSetupRequest . ChannelEnum . Web ,
65
- sdkVersion : "3.7.0"
66
- } ;
67
- }
57
+ // function createPaymentSessionRequest(): checkout.PaymentSetupRequest {
58
+ // return {
59
+ // amount: createAmountObject("USD", 1000),
60
+ // countryCode: "NL",
61
+ // merchantAccount,
62
+ // reference,
63
+ // returnUrl: "https://your-company.com/...",
64
+ // channel: checkout.PaymentSetupRequest.ChannelEnum.Web,
65
+ // sdkVersion: "3.7.0"
66
+ // };
67
+ // }
68
68
69
69
function createUpdatePaymentLinkRequest ( ) : checkout . UpdatePaymentLinkRequest {
70
70
return {
@@ -195,19 +195,19 @@ describe("Checkout", (): void => {
195
195
. matchHeader ( "Idempotency-Key" , "testKey" ) ;
196
196
await checkoutService . PaymentsApi . paymentsDetails ( createPaymentsDetailsRequest ( ) , { idempotencyKey : "testKey" } ) ;
197
197
198
- scope . post ( "/paymentSession" )
199
- . reply ( 200 , paymentSessionSuccess )
200
- . matchHeader ( "Idempotency-Key" , "testKey" ) ;
201
- const paymentSessionRequest : checkout . PaymentSetupRequest = createPaymentSessionRequest ( ) ;
202
- await checkoutService . ClassicCheckoutSDKApi . paymentSession ( paymentSessionRequest , { idempotencyKey : "testKey" } ) ;
198
+ // scope.post("/paymentSession")
199
+ // .reply(200, paymentSessionSuccess)
200
+ // .matchHeader("Idempotency-Key", "testKey");
201
+ // const paymentSessionRequest: checkout.PaymentSetupRequest = createPaymentSessionRequest();
202
+ // await checkoutService.ClassicCheckoutSDKApi.paymentSession(paymentSessionRequest, {idempotencyKey: "testKey"});
203
203
204
- scope . post ( "/payments/result" )
205
- . reply ( 200 , paymentsResultSuccess )
206
- . matchHeader ( "Idempotency-Key" , "testKey" ) ;
207
- const paymentResultRequest : checkout . PaymentVerificationRequest = {
208
- payload : "This is a test payload" ,
209
- } ;
210
- await checkoutService . ClassicCheckoutSDKApi . verifyPaymentResult ( paymentResultRequest , { idempotencyKey : "testKey" } ) ;
204
+ // scope.post("/payments/result")
205
+ // .reply(200, paymentsResultSuccess)
206
+ // .matchHeader("Idempotency-Key", "testKey");
207
+ // const paymentResultRequest: checkout.PaymentVerificationRequest = {
208
+ // payload: "This is a test payload",
209
+ // };
210
+ // await checkoutService.ClassicCheckoutSDKApi.verifyPaymentResult(paymentResultRequest, {idempotencyKey: "testKey"});
211
211
212
212
const orderRequest : checkout . CreateOrderRequest = {
213
213
amount : createAmountObject ( "USD" , 1000 ) ,
@@ -355,23 +355,23 @@ describe("Checkout", (): void => {
355
355
expect ( paymentsResponse . resultCode ) . toEqual ( "Authorised" ) ;
356
356
} ) ;
357
357
358
- test ( "should have payment session success" , async ( ) : Promise < void > => {
359
- scope . post ( "/paymentSession" )
360
- . reply ( 200 , paymentSessionSuccess ) ;
361
- const paymentSessionRequest : checkout . PaymentSetupRequest = createPaymentSessionRequest ( ) ;
362
- const paymentSessionResponse = await checkoutService . ClassicCheckoutSDKApi . paymentSession ( paymentSessionRequest ) ;
363
- expect ( paymentSessionResponse . paymentSession ) . not . toBeUndefined ( ) ;
364
- } ) ;
365
-
366
- test ( "should have payments result" , async ( ) : Promise < void > => {
367
- scope . post ( "/payments/result" )
368
- . reply ( 200 , paymentsResultSuccess ) ;
369
- const paymentResultRequest : checkout . PaymentVerificationRequest = {
370
- payload : "This is a test payload" ,
371
- } ;
372
- const paymentResultResponse = await checkoutService . ClassicCheckoutSDKApi . verifyPaymentResult ( paymentResultRequest ) ;
373
- expect ( paymentResultResponse . resultCode ) . toEqual ( "Authorised" ) ;
374
- } ) ;
358
+ // test("should have payment session success", async (): Promise<void> => {
359
+ // scope.post("/paymentSession")
360
+ // .reply(200, paymentSessionSuccess);
361
+ // const paymentSessionRequest: checkout.PaymentSetupRequest = createPaymentSessionRequest();
362
+ // const paymentSessionResponse = await checkoutService.ClassicCheckoutSDKApi.paymentSession(paymentSessionRequest);
363
+ // expect(paymentSessionResponse.paymentSession).not.toBeUndefined();
364
+ // });
365
+
366
+ // test("should have payments result", async (): Promise<void> => {
367
+ // scope.post("/payments/result")
368
+ // .reply(200, paymentsResultSuccess);
369
+ // const paymentResultRequest: checkout.PaymentVerificationRequest = {
370
+ // payload: "This is a test payload",
371
+ // };
372
+ // const paymentResultResponse = await checkoutService.ClassicCheckoutSDKApi.verifyPaymentResult(paymentResultRequest);
373
+ // expect(paymentResultResponse.resultCode).toEqual("Authorised");
374
+ // });
375
375
376
376
test ( "should have missing identifier on live" , async ( ) : Promise < void > => {
377
377
client . setEnvironment ( "LIVE" ) ;
0 commit comments