connect-sdk-nodejs 6.4.0 → 6.6.0
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/lib/utils/headers.js +1 -1
- package/lib/v1/model/domain/index.d.ts +13 -1
- package/lib/v1/model/payments/index.d.ts +4 -0
- package/lib/v1/payments/finalizecapture.d.ts +3 -0
- package/lib/v1/payments/finalizecapture.js +20 -0
- package/lib/v1/payments/finalizecapture.js.map +1 -0
- package/lib/v1/payments/index.js +2 -0
- package/lib/v1/payments/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/v1/CreateHostedCheckoutRequest.json +3 -0
- package/schemas/v1/CreatePaymentRequest.json +36 -0
package/lib/utils/headers.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.date = date;
|
|
|
9
9
|
function serverMetaInfo(sdkContext) {
|
|
10
10
|
const info = {
|
|
11
11
|
sdkCreator: "Worldline",
|
|
12
|
-
sdkIdentifier: "NodejsServerSDK/v6.
|
|
12
|
+
sdkIdentifier: "NodejsServerSDK/v6.6.0",
|
|
13
13
|
platformIdentifier: `${process.env["OS"]} Node.js/${process.versions.node}`,
|
|
14
14
|
integrator: sdkContext.getIntegrator()
|
|
15
15
|
};
|
|
@@ -424,6 +424,7 @@ export interface CardFraudResults extends FraudResults {
|
|
|
424
424
|
}
|
|
425
425
|
export interface CardPaymentMethodSpecificInput extends AbstractCardPaymentMethodSpecificInput {
|
|
426
426
|
card?: Card | null;
|
|
427
|
+
clickToPay?: ClickToPayInput | null;
|
|
427
428
|
/**
|
|
428
429
|
* @deprecated Use threeDSecure.externalCardholderAuthenticationData instead
|
|
429
430
|
*/
|
|
@@ -443,6 +444,7 @@ export interface CardPaymentMethodSpecificInputBase extends AbstractCardPaymentM
|
|
|
443
444
|
export interface CardPaymentMethodSpecificOutput extends AbstractPaymentMethodSpecificOutput {
|
|
444
445
|
authorisationCode?: string | null;
|
|
445
446
|
card?: CardEssentials | null;
|
|
447
|
+
clickToPayUsed?: boolean | null;
|
|
446
448
|
fraudResults?: CardFraudResults | null;
|
|
447
449
|
initialSchemeTransactionId?: string | null;
|
|
448
450
|
networkTokenData?: NetworkTokenData | null;
|
|
@@ -467,6 +469,7 @@ export interface CardWithoutCvv extends CardEssentials {
|
|
|
467
469
|
issueNumber?: string | null;
|
|
468
470
|
}
|
|
469
471
|
export interface CashPaymentMethodSpecificInput extends AbstractCashPaymentMethodSpecificInput {
|
|
472
|
+
paymentProduct1502SpecificInput?: CashPaymentProduct1502SpecificInput | null;
|
|
470
473
|
/**
|
|
471
474
|
* @deprecated No replacement
|
|
472
475
|
*/
|
|
@@ -478,6 +481,7 @@ export interface CashPaymentMethodSpecificInput extends AbstractCashPaymentMetho
|
|
|
478
481
|
paymentProduct1522SpecificInput?: CashPaymentProduct1522SpecificInput | null;
|
|
479
482
|
paymentProduct1523SpecificInput?: CashPaymentProduct1523SpecificInput | null;
|
|
480
483
|
paymentProduct1524SpecificInput?: CashPaymentProduct1524SpecificInput | null;
|
|
484
|
+
paymentProduct1525SpecificInput?: CashPaymentProduct1525SpecificInput | null;
|
|
481
485
|
paymentProduct1526SpecificInput?: CashPaymentProduct1526SpecificInput | null;
|
|
482
486
|
}
|
|
483
487
|
export interface CashPaymentMethodSpecificInputBase extends AbstractCashPaymentMethodSpecificInput {
|
|
@@ -485,6 +489,8 @@ export interface CashPaymentMethodSpecificInputBase extends AbstractCashPaymentM
|
|
|
485
489
|
export interface CashPaymentMethodSpecificOutput extends AbstractPaymentMethodSpecificOutput {
|
|
486
490
|
fraudResults?: FraudResults | null;
|
|
487
491
|
}
|
|
492
|
+
export interface CashPaymentProduct1502SpecificInput extends CashPaymentProductWithRedirectSpecificInputBase {
|
|
493
|
+
}
|
|
488
494
|
/**
|
|
489
495
|
* @deprecated No replacement
|
|
490
496
|
*/
|
|
@@ -508,6 +514,8 @@ export interface CashPaymentProduct1523SpecificInput extends CashPaymentProductW
|
|
|
508
514
|
}
|
|
509
515
|
export interface CashPaymentProduct1524SpecificInput extends CashPaymentProductWithRedirectSpecificInputBase {
|
|
510
516
|
}
|
|
517
|
+
export interface CashPaymentProduct1525SpecificInput extends CashPaymentProductWithRedirectSpecificInputBase {
|
|
518
|
+
}
|
|
511
519
|
export interface CashPaymentProduct1526SpecificInput extends CashPaymentProductWithRedirectSpecificInputBase {
|
|
512
520
|
}
|
|
513
521
|
export interface CashPaymentProductWithRedirectSpecificInputBase {
|
|
@@ -527,9 +535,12 @@ export interface ClickToPayConfigurationVisa extends ClickToPaySchemeConfigurati
|
|
|
527
535
|
export interface ClickToPayDisplayHints {
|
|
528
536
|
logo?: string | null;
|
|
529
537
|
}
|
|
538
|
+
export interface ClickToPayInput {
|
|
539
|
+
checkoutResponseSignature?: string | null;
|
|
540
|
+
}
|
|
530
541
|
export interface ClickToPaySchemeConfigurationBase {
|
|
531
|
-
srcDpaId?: string | null;
|
|
532
542
|
srcInitiatorId?: string | null;
|
|
543
|
+
srciDpaId?: string | null;
|
|
533
544
|
}
|
|
534
545
|
export interface CompanyInformation {
|
|
535
546
|
dateOfIncorporation?: string | null;
|
|
@@ -1140,6 +1151,7 @@ export interface GiftCardPurchase {
|
|
|
1140
1151
|
numberOfGiftCards?: number | null;
|
|
1141
1152
|
}
|
|
1142
1153
|
export interface HostedCheckoutSpecificInput {
|
|
1154
|
+
allowClickToPay?: boolean | null;
|
|
1143
1155
|
isRecurring?: boolean | null;
|
|
1144
1156
|
locale?: string | null;
|
|
1145
1157
|
paymentProductFilters?: PaymentProductFiltersHostedCheckout | null;
|
|
@@ -37,6 +37,10 @@ export interface PaymentsClient {
|
|
|
37
37
|
* Resource /{merchantId}/payments/{paymentId}/capture - <a href="https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/nodejs/payments/capture.html">Capture payment</a>
|
|
38
38
|
*/
|
|
39
39
|
capture(merchantId: string, paymentId: string, postData: CapturePaymentRequest, paymentContext?: PaymentContext | null): Promise<SdkResponse<CaptureResponse, ErrorResponse>>;
|
|
40
|
+
/**
|
|
41
|
+
* Resource /{merchantId}/payments/{paymentId}/finalizecapture - <a href="https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/nodejs/payments/finalizecapture.html">Finalize capture</a>
|
|
42
|
+
*/
|
|
43
|
+
finalizecapture(merchantId: string, paymentId: string, paymentContext?: PaymentContext | null): Promise<SdkResponse<PaymentResponse, ErrorResponse>>;
|
|
40
44
|
/**
|
|
41
45
|
* Resource /{merchantId}/payments/{paymentId}/cancelapproval - <a href="https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/nodejs/payments/cancelapproval.html">Undo capture payment</a>
|
|
42
46
|
*/
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PaymentContext, SdkContext, SdkResponse } from "../../model";
|
|
2
|
+
import { ErrorResponse, PaymentResponse } from "../model/domain";
|
|
3
|
+
export declare function finalizecapture(sdkContext: SdkContext): (merchantId: string, paymentId: string, paymentContext?: PaymentContext | null) => Promise<SdkResponse<PaymentResponse, ErrorResponse>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.finalizecapture = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* This file was auto-generated from the API references found at
|
|
6
|
+
* https://apireference.connect.worldline-solutions.com/
|
|
7
|
+
*/
|
|
8
|
+
const communicator_1 = require("../../utils/communicator");
|
|
9
|
+
function finalizecapture(sdkContext) {
|
|
10
|
+
return function (merchantId, paymentId, paymentContext) {
|
|
11
|
+
return (0, communicator_1.json)({
|
|
12
|
+
method: "POST",
|
|
13
|
+
modulePath: `/v1/${merchantId}/payments/${paymentId}/finalizecapture`,
|
|
14
|
+
body: null,
|
|
15
|
+
paymentContext: paymentContext
|
|
16
|
+
}, sdkContext);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.finalizecapture = finalizecapture;
|
|
20
|
+
//# sourceMappingURL=finalizecapture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalizecapture.js","sourceRoot":"","sources":["../../../src/v1/payments/finalizecapture.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2DAAgD;AAIhD,SAAgB,eAAe,CAC7B,UAAsB;IAEtB,OAAO,UAAS,UAAU,EAAE,SAAS,EAAE,cAAc;QACnD,OAAO,IAAA,mBAAI,EACT;YACE,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,OAAO,UAAU,aAAa,SAAS,kBAAkB;YACrE,IAAI,EAAE,IAAI;YACV,cAAc,EAAE,cAAc;SAC/B,EACD,UAAU,CAC6C,CAAC;IAC5D,CAAC,CAAC;AACJ,CAAC;AAdD,0CAcC"}
|
package/lib/v1/payments/index.js
CHANGED
|
@@ -14,6 +14,7 @@ const tokenize_1 = require("./tokenize");
|
|
|
14
14
|
const processchallenged_1 = require("./processchallenged");
|
|
15
15
|
const approve_1 = require("./approve");
|
|
16
16
|
const capture_1 = require("./capture");
|
|
17
|
+
const finalizecapture_1 = require("./finalizecapture");
|
|
17
18
|
const cancelapproval_1 = require("./cancelapproval");
|
|
18
19
|
const captures_1 = require("./captures");
|
|
19
20
|
const refund_1 = require("./refund");
|
|
@@ -33,6 +34,7 @@ function newPaymentsClient(sdkContext) {
|
|
|
33
34
|
processchallenged: (0, processchallenged_1.processchallenged)(sdkContext),
|
|
34
35
|
approve: (0, approve_1.approve)(sdkContext),
|
|
35
36
|
capture: (0, capture_1.capture)(sdkContext),
|
|
37
|
+
finalizecapture: (0, finalizecapture_1.finalizecapture)(sdkContext),
|
|
36
38
|
cancelapproval: (0, cancelapproval_1.cancelapproval)(sdkContext),
|
|
37
39
|
captures: (0, captures_1.captures)(sdkContext),
|
|
38
40
|
refund: (0, refund_1.refund)(sdkContext),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/payments/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,qCAAkC;AA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AA,qCAAiB,EAAC,UAAU,CAAC;KACjD,CAAC;AACJ,CAAC;AArBD,8CAqBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "connect-sdk-nodejs",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "SDK to communicate with the Worldline Global Collect platform using the Worldline Connect Server API",
|
|
5
5
|
"homepage": "https://github.com/Worldline-Global-Collect/connect-sdk-nodejs#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -501,6 +501,9 @@
|
|
|
501
501
|
"card" : {
|
|
502
502
|
"$ref" : "#/definitions/Card"
|
|
503
503
|
},
|
|
504
|
+
"clickToPay" : {
|
|
505
|
+
"$ref" : "#/definitions/ClickToPayInput"
|
|
506
|
+
},
|
|
504
507
|
"customerReference" : {
|
|
505
508
|
"type" : "string"
|
|
506
509
|
},
|
|
@@ -584,6 +587,9 @@
|
|
|
584
587
|
"CashPaymentMethodSpecificInput" : {
|
|
585
588
|
"type" : "object",
|
|
586
589
|
"properties" : {
|
|
590
|
+
"paymentProduct1502SpecificInput" : {
|
|
591
|
+
"$ref" : "#/definitions/CashPaymentProduct1502SpecificInput"
|
|
592
|
+
},
|
|
587
593
|
"paymentProduct1503SpecificInput" : {
|
|
588
594
|
"$ref" : "#/definitions/CashPaymentProduct1503SpecificInput"
|
|
589
595
|
},
|
|
@@ -608,6 +614,9 @@
|
|
|
608
614
|
"paymentProduct1524SpecificInput" : {
|
|
609
615
|
"$ref" : "#/definitions/CashPaymentProduct1524SpecificInput"
|
|
610
616
|
},
|
|
617
|
+
"paymentProduct1525SpecificInput" : {
|
|
618
|
+
"$ref" : "#/definitions/CashPaymentProduct1525SpecificInput"
|
|
619
|
+
},
|
|
611
620
|
"paymentProduct1526SpecificInput" : {
|
|
612
621
|
"$ref" : "#/definitions/CashPaymentProduct1526SpecificInput"
|
|
613
622
|
},
|
|
@@ -618,6 +627,15 @@
|
|
|
618
627
|
},
|
|
619
628
|
"additionalProperties" : false
|
|
620
629
|
},
|
|
630
|
+
"CashPaymentProduct1502SpecificInput" : {
|
|
631
|
+
"type" : "object",
|
|
632
|
+
"properties" : {
|
|
633
|
+
"returnUrl" : {
|
|
634
|
+
"type" : "string"
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
"additionalProperties" : false
|
|
638
|
+
},
|
|
621
639
|
"CashPaymentProduct1503SpecificInput" : {
|
|
622
640
|
"type" : "object",
|
|
623
641
|
"properties" : {
|
|
@@ -690,6 +708,15 @@
|
|
|
690
708
|
},
|
|
691
709
|
"additionalProperties" : false
|
|
692
710
|
},
|
|
711
|
+
"CashPaymentProduct1525SpecificInput" : {
|
|
712
|
+
"type" : "object",
|
|
713
|
+
"properties" : {
|
|
714
|
+
"returnUrl" : {
|
|
715
|
+
"type" : "string"
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"additionalProperties" : false
|
|
719
|
+
},
|
|
693
720
|
"CashPaymentProduct1526SpecificInput" : {
|
|
694
721
|
"type" : "object",
|
|
695
722
|
"properties" : {
|
|
@@ -699,6 +726,15 @@
|
|
|
699
726
|
},
|
|
700
727
|
"additionalProperties" : false
|
|
701
728
|
},
|
|
729
|
+
"ClickToPayInput" : {
|
|
730
|
+
"type" : "object",
|
|
731
|
+
"properties" : {
|
|
732
|
+
"checkoutResponseSignature" : {
|
|
733
|
+
"type" : "string"
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
"additionalProperties" : false
|
|
737
|
+
},
|
|
702
738
|
"CompanyInformation" : {
|
|
703
739
|
"type" : "object",
|
|
704
740
|
"properties" : {
|