Git Product home page Git Product logo

mastercard-api-client-tutorial's Introduction

mastercard-api-client-tutorial's People

Contributors

akshaykdubey avatar danny-gallagher avatar dependabot[bot] avatar ech0s7r avatar jaaufauvre avatar karen-avetisyan-mc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mastercard-api-client-tutorial's Issues

Api-Client

After executing the below line api-client folder is created.
openapi-generator-cli generate -g csharp-netcore -i *.yaml -c config.json -o api_client

I have chosen CSharp but when I try to oepn the solution using VS2015 it is unable to load the project.

Which tool is needed to open the api-client project?

generated model AuthenticationMethods have wrong type for id

In this generated model
Acme.App.MastercardApi.Client/Model/AuthenticationMethods.cs

the id is of type int, but the openapi spec says string

image

this causes an error when the API client tries de-serialize a response with a large ID, essentially ending up with null Data:

{
    "StatusCode": 200,
    "Headers": { ... },
    "Data": null,
    "ErrorText": "JSON integer 3123456789 is too large or small for an Int32. Path 'authenticationMethods[0].id', line 7, position 22."
}

was this client generated by an older openapi spec perhaps?

installing openapi-generator-cli gives below error

openapi-generator-cli version-manager set 5.1.0
(node:59180) UnhandledPromiseRejectionWarning: Error: java.lang.UnsupportedClassVersionError: org/openapitools/codegen/OpenAPIGenerator : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Exception in thread "main"
at C:\Users\Rukhiya\AppData\Roaming\npm\node_modules@openapitools\openapi-generator-cli\main.js:636:32
at ChildProcess.exithandler (child_process.js:397:5)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1055:16)
at Socket. (internal/child_process.js:441:11)
at Socket.emit (events.js:400:28)
at Pipe. (net.js:675:12)
(Use node --trace-warnings ... to show where the warning was created)
(node:59180) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:59180) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will
terminate the Node.js process with a non-zero exit code.

Java version on my system
C:\windows\system32>java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

Please advise how to fix this issue.

buildTokenizeRequestSchema

hello,
while i'm testing i get this error message : The method buildTokenizeRequestSchema() is undefined
in this line :
TokenizeRequestSchema request = buildTokenizeRequestSchema();

help plz

tokenizeResponseSchema null

hello,
i'am working on tokenization project,i'am using tokenizeApi but when i send a tokenization request i get null response( all fields are null)
i don't know what is the problem.
help please

Unable to open charp project

I am unable to open the csharp project in VS2015

The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. E:\MasterCard\mastercard-api-client-tutorial-main\csharp\Acme.App.MastercardApi.Client\Acme.App.MastercardApi.Client.csproj

The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. E:\MasterCard\mastercard-api-client-tutorial-main\csharp\Acme.App.MastercardApi.Client.Tests\Acme.App.MastercardApi.Client.Tests.csproj

using the generated api client in multiple environments

Heya, I generated a C# client from the openapi spec.

I noticed the generated API client will call paths relative to sandbox
For example TokenizeApi.CreateTokenizeWithHttpInfoAsync

Notice the path ...PostAsync<TokenizeResponseSchema>("/digitization/static/1/0/tokenize",

This works in sandbox,
baseURL https://sandbox.api.mastercard.com/mdes + path /digitization/static/1/0/tokenize

However if I were to use the same client in mtf or prod, the resulting path would include /digitization/static/1/0, which would fail.

According to the api reference, the environment domains are:

prod    https://api.mastercard.com/mdes/digitization/1/0/tokenize
mtf     https://api.mastercard.com/mdes/digitization/mtf/1/0/tokenize
sandbox https://sandbox.api.mastercard.com/mdes/digitization/static/1/0/tokenize

I could hack TokenizeApi (and the other Api classes) to ...PostAsync<TokenizeResponseSchema>("/1/0/tokenize",
and use different baseURLs like

https://api.mastercard.com/mdes/digitization
https://api.mastercard.com/mdes/digitization/mtf 
https://sandbox.api.mastercard.com/mdes/digitization/static

Works, but it's a hack. What am I missing here?

Internal Server Error:Issue while posting for Merchant Mappings

Hello, I have implemented this client code (csharp) for the Mastercard merchant mappings, getting an 'Internal Server Error' in response while posting the request to Mastercard Directory Services as it includes encryption and decryption.
Unfortunately, there isn't a lot of details in the error:
Response:
{"Errors":{"Error":[{"Source":"SYSTEM","ReasonCode":"SERVICE_ERROR","Description":"","Recoverable":false}]}}

P.S. I am getting a successful response while fetching an existing sample mapping record.
Support isn't helpful yet so... Thanx in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.