Skip to content

ZooMMaX/MKBecomAPI4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MKBecomAPI4j

Wrapper for API of Moscow Credit Bank (MCB)

Maven Central api v GitHub

Wrapper initialization

To initialize the wrapper, you need to set the parameters:

  • KEYSTOREPATH - path to the certificate
  • KEYSTOREPASS - сertificate key
  • KEYPASS - alias key
  • TEST - true if the certificate is a test one, false otherwise

example initalize

...

Init.setTEST(true);
Init.setKEYSTOREPATH("cert.p12");
Init.setKEYSTOREPASS("passwd");
Init.setKEYPASS("passwd"); 

...

Sending a request and receiving a response

To create a request, the library provides PayloadBuilder.class.

ResponseParser.class is provided in the library for parsing the response and getting fields.

example srpr

public class Main {
    public static void main(String[] args){
        Init.setTEST(true);
        Init.setKEYSTOREPATH("cert.p12");
        Init.setKEYSTOREPASS("passwd");
        Init.setKEYPASS("passwd");
        PayloadBuilder getData = PayloadBuilder.builder()
                .mid("600000000002121")
                .oid("test")
                .pan("4432730000000168")
                .exp_date("2106")
                .cvv("986")
                .amount("000000000100")
                .currency("643")
                .aid("443222")
                .client_mail("test@mkb.ru")
                .build();
        ResposeParser dataParser = getData.request(MkbEndPoints.pareq3dsACS, RequestType.POST);
        System.out.println(dataParser.getAcs_url()+"\n"+dataParser.getPareq());
        
    }
}

MkbEndPoints - enumeration of available url paths in the API.

RequestType - enumeration of available types of http requests in the API.


pdf.ico OPEN MCB API DOCS


dependency maven

<dependency>
  <groupId>ru.zoommax</groupId>
  <artifactId>MKBecomAPI4j</artifactId>
  <version>1.0</version>
</dependency>

dependency gradle

implementation 'ru.zoommax:MKBecomAPI4j:1.0'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages