Skip to content

gregorymel/smz-hack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smz-hack

Api for SMZ and hashconnect

Run server locallynode index.js

Server uses API mentioned below (see ./src directory for more details):

API Reference

smz.getStatus

smz.getStatus(authToken, userInn)

const ruid = await smz.getStatus(token, inn);
  • token String. The bearer access token for smz-api.

  • inn String. Individual tax number of the user.

  • Returns id of the request.

Get info about user using his individual tax number.

smz.bindPartner

smz.bindPartner(authToken, userInn)

const ruid = await bindPartner(token, inn);
  • token String. The bearer access token for smz-api.

  • inn String. Individual tax number of the user.

  • Returns id of the request.

Bind user to the partner's app using user's individual tax number

smz.getAuthToken

smz.getAuthToken(username, password, clientId);

const token = await smz.getAuthToken(username, password, clientId);
  • username String. Partner app name.

  • clientId String. It's equal to "smz".

  • password String. Partner app password.

  • Returns access token.

smz.waitRequest

smz.waitRequest(token, ruid)

const payloadStatus = await waitRequest(token, ruid);
  • token String. The bearer access token for smz-api.

  • ruid String. Unique request identifier.

  • Returns response body

Wait for the reuest status change.

hashconnect.createPaymentLink

hashconnect.createPaymentLink(siteId, ruid, pageParameters, price)

const url = await createPaymentLink(siteId, ruid, pageParams, price);
  • siteId String. Unique identifier (shoud be given by Hashconnect)

  • pageParams String. Links where user should be redirected from the payment page

  • price String. Price of the deal

  • ruid String. Unique request identifier.

  • Returns payment link

Creates payment and returns url where user should redirected.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published