cybersource / cybersource-flex-samples-java Goto Github PK
View Code? Open in Web Editor NEWSimple examples of how to use the Flex API and microform
License: MIT License
Simple examples of how to use the Flex API and microform
License: MIT License
Is it possible to generate multiple Flex microforms on a single page? I have searched and searched through the documentation and have yet to find a definitive answer to this. Everything I've seen is the assumption is only one credit card number needs to be tokenized per form.
import FlexSDKWeb from '@cybersource/flex-sdk-web';
let jwk = await this.generatePublicKey(),
options = {
kid: jwk.kid,
keystore: jwk,
cardInfo: {
cardNumber: '4111111111111111',
cardType: '001',
expiryMonth: '11',
expiryYear: '2022',
},
encryptionType: 'rsaoaep256',
production: false,
};
FlexSDKWeb.createToken(options, (response) => {
console.log(response);
});
TypeError: Cannot read property 'importKey' of undefined
at y (flex-sdk-web.js?c502:11)
at eval (flex-sdk-web.js?c502:11)
at d (flex-sdk-web.js?c502:11)
at Object.createToken (flex-sdk-web.js?c502:11)
at VueComponent._callee3$ (AddPaymentMethod.vue?0e2c:456)
at tryCatch (runtime.js?98b8:45)
at Generator.invoke [as _invoke] (runtime.js?98b8:274)
at Generator.prototype. [as next] (runtime.js?98b8:97)
at asyncGeneratorStep (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/AddPaymentMethod.vue?vue&type=script&lang=js&:24)
at _next (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/AddPaymentMethod.vue?vue&type=script&lang=js&:26)
This is happening in my localhost development in Chrome version: Version 80.0.3987.149 (Official Build) (64-bit)
We are going to introduce Content Security Policy on our site. So, we want to know from you what domains we need to list down so that we can use the '@cybersource/flex-sdk-web' package. Please share the domain list.
When will this API be live/testable?
How does this differ with the VISA Flex implementation?
Hi all,
I downloaded the flex-server-sdk-0.3.2-source.jar from https://repo1.maven.org/maven2/com/cybersource/flex-server-sdk/0.3.2/ to study the sdk.
However, I found some packages and classes are missing in the source jar file.
the structure of flex-server-sdk-0.3.2.jar
the structure of flex-server-sdk-0.3.2-source.jar
As you see, the imple, internal and repackaged packges are not found in the source jar file.
Could you help to give some suggestion to download complete source file?
Thanks.
Hi,
I am getting the error if I used this package on iPad Air. at createToken method.. I am on latest safari browser and I have tried with '@cybersource/flex-sdk-web/legacy' as well. Could you please assist me on this.
I want to send a Generate Key request directly to the CyberSource API (example: https://apitest.cybersource.com/flex/v1/keys)
What is the correct procedure for signing that request?
The sample c# code in the repository seems to be out of date, and the Java example is using the VISA api (which I do not want to use)
Thanks!
Hello,
when I tried to run your jsp-microform example, I've encountered the following exception:
org.apache.jasper.JasperException: An exception occurred processing [/index.jsp] at line [80]
...
javax.servlet.ServletException: com.cybersource.flex.sdk.exception.FlexSDKInternalException: Error parsing FLEX API error response: [responseStatus is expected]
...
I am using:
Java 1.8.0_112
Tomcat 8.5.47
Maven 3.3.9 (pom.xml specifies version 3.2.0)
JS Flex Microform lib 0.4.0
flex-server-sdk 0.3.0
I've followed the instructions in README.md for build and setup of the example.
I kindly ask you for further advice.
I am trying to find a consolidated end to end example (with our organizations details of course). Anyway, the last posts here from 2017 say that Flex Token API is in Beta. Is it still? The documentation could use another pass to clean it up a bit then. For example, from here:
https://www.npmjs.com/package/@cybersource/flex-sdk-web
There is a 'Download Release' link that leads to a 404 page on CyberSource. Anyhow, I downloaded it using npm, but I was hoping for a little bit of a 'How To' using plain, simple forms. Plug your Merchant ID in here, put your API Key Here, pass it to JWK here ... that kind of thing. Have you guys got anything like that? Thank you,
Not sure if this is right place, but this is the repo linked from https://www.npmjs.com/package/@cybersource/flex-sdk-web.
The example shown there uses expiryMonth and expiryYear. It should be cardExpirationMonth and cardExpirationYear; if the example is used as it is shown, the tokenization process will silently strip the junk variables out and return a token with a default expiration date.
We are using Flex API to tokenize card, but the token generated has first and last name as 'NOREAL NAME' and generic address, How to update the name and address on token profile ?
Your documentation has no information on how to update the token profile, please help this is an urgent need, thanks
The link supplied here: https://www.npmjs.com/package/@cybersource/flex-sdk-web#example-integration under Example integrations is broken. Also i'm not sure if I am submitting this issue to the correct place because the links to the npm repo points to this repo which seems to be java.
Also in the documentation that I did find, sending a sessions request payload to https://apitest.cybersource.com/flex/v2/sessions
does not seem to work. Any help would be greatly appreciated!
In the readme.md file at the end example it says to: " Place the token in the CustomerId field:" but then at the end of the JSON payload has a line that says: "transientTokenJwt": "[PLACE YOUR FLEX TOKEN HERE]"
Can you please clarify where you put the Flex Token?
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.