Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit d34f482

Browse files
author
Ingenico ePayments
committed
Release 2.10.0.
1 parent c700a3f commit d34f482

File tree

8 files changed

+124
-2
lines changed

8 files changed

+124
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "connect-sdk-nodejs",
3-
"version": "2.9.0",
3+
"version": "2.10.0",
44
"description": "SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API",
55
"dependencies": {
66
"dateformat": "^1.0.12",

products/customerDetails.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"use strict";
2+
/*
3+
* This file was auto-generated from the API references found at
4+
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
5+
*/
6+
var validate = require('jsonschema').validate;
7+
var communicator = require('../utils/communicator');
8+
var sdkcontext = require('../utils/context');
9+
var requestSchema = require('../schemas/product/GetCustomerDetailsRequest.json');
10+
11+
var myModule = function (merchantId, paymentProductId, postData, paymentContext, cb) {
12+
// validate postData
13+
var isValidRequest = validate(postData, requestSchema);
14+
if (!isValidRequest.valid) {
15+
var logger = sdkcontext.getLogger();
16+
if (sdkcontext.isLoggingEnabled()) {
17+
logger('error', isValidRequest.errors);
18+
}
19+
throw new Error(isValidRequest.errors);
20+
}
21+
communicator({
22+
method: 'POST',
23+
modulePath: '/v1/' + merchantId + '/products/' + paymentProductId + '/customerDetails',
24+
body: postData,
25+
paymentContext: paymentContext,
26+
cb: cb
27+
});
28+
}
29+
30+
module.exports = myModule;

products/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ modules['networks'] = require('./networks');
1515
// console.log(`Added networks to module space`);
1616
modules['publicKey'] = require('./publicKey');
1717
// console.log(`Added publicKey to module space`);
18+
modules['customerDetails'] = require('./customerDetails');
19+
// console.log(`Added customerDetails to module space`);
1820

1921
module.exports = modules;

schemas/hostedcheckout/CreateHostedCheckoutRequest.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,13 +630,20 @@
630630
"type" : "integer",
631631
"maximum" : 9223372036854775807
632632
},
633+
"googleProductCategoryId" : {
634+
"type" : "integer",
635+
"maximum" : 9223372036854775807
636+
},
633637
"lineAmountTotal" : {
634638
"type" : "integer",
635639
"maximum" : 9223372036854775807
636640
},
637641
"productCode" : {
638642
"type" : "string"
639643
},
644+
"productName" : {
645+
"type" : "string"
646+
},
640647
"productPrice" : {
641648
"type" : "integer",
642649
"maximum" : 9223372036854775807

schemas/payment/CompletePaymentRequest.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,13 +477,20 @@
477477
"type" : "integer",
478478
"maximum" : 9223372036854775807
479479
},
480+
"googleProductCategoryId" : {
481+
"type" : "integer",
482+
"maximum" : 9223372036854775807
483+
},
480484
"lineAmountTotal" : {
481485
"type" : "integer",
482486
"maximum" : 9223372036854775807
483487
},
484488
"productCode" : {
485489
"type" : "string"
486490
},
491+
"productName" : {
492+
"type" : "string"
493+
},
487494
"productPrice" : {
488495
"type" : "integer",
489496
"maximum" : 9223372036854775807

schemas/payment/CreatePaymentRequest.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"directDebitPaymentMethodSpecificInput" : {
1515
"$ref" : "#/definitions/NonSepaDirectDebitPaymentMethodSpecificInput"
1616
},
17+
"eInvoicePaymentMethodSpecificInput" : {
18+
"$ref" : "#/definitions/EInvoicePaymentMethodSpecificInput"
19+
},
1720
"encryptedCustomerInput" : {
1821
"type" : "string"
1922
},
@@ -502,6 +505,39 @@
502505
"required" : [ "cryptogram", "dpan", "expiryDate" ],
503506
"additionalProperties" : false
504507
},
508+
"EInvoicePaymentMethodSpecificInput" : {
509+
"type" : "object",
510+
"properties" : {
511+
"acceptedTermsAndConditions" : {
512+
"type" : "boolean"
513+
},
514+
"paymentProduct9000SpecificInput" : {
515+
"$ref" : "#/definitions/EInvoicePaymentProduct9000SpecificInput"
516+
},
517+
"paymentProductId" : {
518+
"type" : "integer",
519+
"maximum" : 2147483647
520+
},
521+
"requiresApproval" : {
522+
"type" : "boolean"
523+
}
524+
},
525+
"required" : [ "acceptedTermsAndConditions" ],
526+
"additionalProperties" : false
527+
},
528+
"EInvoicePaymentProduct9000SpecificInput" : {
529+
"type" : "object",
530+
"properties" : {
531+
"bankAccountIban" : {
532+
"$ref" : "#/definitions/BankAccountIban"
533+
},
534+
"installmentId" : {
535+
"type" : "string"
536+
}
537+
},
538+
"required" : [ "installmentId" ],
539+
"additionalProperties" : false
540+
},
505541
"ExternalCardholderAuthenticationData" : {
506542
"type" : "object",
507543
"properties" : {
@@ -858,13 +894,20 @@
858894
"type" : "integer",
859895
"maximum" : 9223372036854775807
860896
},
897+
"googleProductCategoryId" : {
898+
"type" : "integer",
899+
"maximum" : 9223372036854775807
900+
},
861901
"lineAmountTotal" : {
862902
"type" : "integer",
863903
"maximum" : 9223372036854775807
864904
},
865905
"productCode" : {
866906
"type" : "string"
867907
},
908+
"productName" : {
909+
"type" : "string"
910+
},
868911
"productPrice" : {
869912
"type" : "integer",
870913
"maximum" : 9223372036854775807
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema" : "http://json-schema.org/draft-04/schema#",
3+
"type" : "object",
4+
"properties" : {
5+
"countryCode" : {
6+
"type" : "string"
7+
},
8+
"values" : {
9+
"type" : "array",
10+
"items" : {
11+
"$ref" : "#/definitions/KeyValuePair"
12+
},
13+
"minItems" : 1,
14+
"uniqueItems" : false
15+
}
16+
},
17+
"required" : [ "values" ],
18+
"additionalProperties" : false,
19+
"definitions" : {
20+
"KeyValuePair" : {
21+
"type" : "object",
22+
"properties" : {
23+
"key" : {
24+
"type" : "string"
25+
},
26+
"value" : {
27+
"type" : "string"
28+
}
29+
},
30+
"additionalProperties" : false
31+
}
32+
}
33+
}

utils/headers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var serverMetaInfo = function (sdkContext) {
99
key: "X-GCS-ServerMetaInfo",
1010
value: {
1111
'sdkCreator': 'Ingenico',
12-
'sdkIdentifier': 'NodejsServerSDK/v2.9.0',
12+
'sdkIdentifier': 'NodejsServerSDK/v2.10.0',
1313
'platformIdentifier': process.env['OS'] + ' Node.js/' + process.versions.node
1414
}
1515
};

0 commit comments

Comments
 (0)