ingenico-epayments / connect-sdk-client-js Goto Github PK
View Code? Open in Web Editor NEWIngenico Connect JavaScript Client SDK
Home Page: https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/javascript/
License: Other
Ingenico Connect JavaScript Client SDK
Home Page: https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/javascript/
License: Other
import connect from 'connect-sdk-client-js/dist/connectsdk.js';
[...] {
//sessionDetails is coming from our APi:
//sessionDetails = {clientSessionId: "...",
// customerId: "...",
// region: "EU",
// environment: "PREPROD"}
const session = new connect(sessionDetails);
const ingenicoPaymentDetails = {
totalAmount: paymentDetails.amount,
countryCode: currentUser.country,
locale: `${currentUser.locale}_${currentUser.country}`,
currency: paymentDetails.currencyCode.toUpperCase(),
isRecurring: false
};
return createPayload(session, cardDetails, ingenicoPaymentDetails);
}
Using this code, when i use the createPayload given in the requirejs example to test :
https://github.com/Ingenico-ePayments/connect-sdk-client-js-example/blob/master/minimal-requirejs/js/create-payload.js
I can observe that the Authorization header of the request sent by getIINdetails
has this value:
Authorization: GCS v1Client:undefined
I checked and rechecked : the clientSessionId is set properly in sessionDetails.
The code is mostly based on what i found in the webpack example by the way.
Could you please help me with this?
Since yesterday, 10/Aug, the Get Payment Product api is returning the cardholderName field as mandatory. This is causing a problem in our application. In STAG this field is not mandatory, only in Production. Is it possible to remove this mandatory field?
API: https://ams1.api-ingenico.com/client/v1/.../products/1?countryCode=AR&isRecurring=false&amount=180000¤cyCode=ARS&locale=es_ES&cacheBust=1628706586336
{ "dataRestrictions" : { "isRequired" : true, "validators" : { "length" : { "maxLength" : 50, "minLength" : 2 }, "regularExpression" : { "regularExpression" : "^[-\\sA-Za-z0-9ªºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƒƠơƯưǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǺǻǼǽǾǿȘșȚțΆΈΉΊΌΎΏΑΓΔΕΖΗΙΚΛΝΟΡΣΥΩΪΫάέήίαβγδεζηικλμνξοπρςστυψωϊϋόύώЁЄЇАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяёєїҐґẠạẢảấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặẸẹẺẻẼẽẾếỀềỂểỄễỆệỈỉỊịỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợỤụỦủỨứỪừỬửỮữỰựỲỳỴỵỶỷỸỹ.'/]+$" } } }, "displayHints" : { "alwaysShow" : false, "displayOrder" : 1142, "formElement" : { "type" : "text" }, "label" : "Nombre del titular de la tarjeta", "obfuscate" : false, "placeholderLabel" : "John Doe", "preferredInputType" : "StringKeyboard" }, "id" : "cardholderName", "type" : "string" }
Does this work with PinPad Terminals or is it only for android / IOS and Web integrations
When I used the webpack example i got this error in src/AndroidPay.js
I'll fix this in a PR
Error is not being propagating to the calling function and "UNKNOWN" errors are impossible to act on. We have a use case where user might have an expired session and in order for us to "act" on this, we need to get some indicator in the application that call is being rejected due to "some" access issue. You can find below an abstract sample, showing that there is nothing useful that is coming back in the error response.
We've created a non intrusive inclusion of error, allowing our client to access error response and act upon in.
PR: #12
const connectSession = new connectsdk.Session(
session.sessionToken.token
);
try {
const iinDetails = await connectSession.getIinDetails(
creditCard.number,
paymentDetails
);
} catch (e) {
// nothing useful in this error response
}
When I create a session through the PHP Server SDK I get a response similar to this:
{
"assetUrl": "https:\/\/payment.pay1.preprod.secured-by-ingenico.com\/",
"clientApiUrl": "https:\/\/ams1.preprod.api-ingenico.com\/client",
"clientSessionId": "<session-id>",
"customerId": "<client-id>",
"region": "EU"
}
However this can not directly be used to create a JavaScript SDK Session, since it expects the following properties (see here):
Do I really have to manually map the session properties?
Also the clientApiUrl
is not usable directly, since the tester expects the url to end with client/v1
instead of just client
, which is actually returned from the getSession
endpoint.
Hi,
How to integrate the 3D Secure service in react-native application ??
How to replace the returnUrl ??
It would be nice to use Bower to install the library. Is it possible to publish the library as Bower package?
I installed the SDK from npm but when I try to run the encrypted version it raises about undefined 'forge'. When I look into it this seems to be a third part encryption library? As a dependency I'd expect it to be installed with the package.
I see it minified in the examples repos but it is very old and the webpack example readme notes we have to update it:
https://github.com/Ingenico-ePayments/connect-sdk-client-js-example/tree/master/minimal-webpack
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.