Skip to content

tohoff82/CryptopayConector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CryptopayConector

C# API wrapper for CryptoPay https://telegra.ph/Crypto-Pay-API-11-25

How to use this CryptoPay API connector?

Install-Package CryptoPay.Conector -Version 1.0.0

1 Use dependency injection

1.1 Add CryptoPay to your dependency container

services.AddCryptopay(new CryptopayCredentials( apiUrl: "https://testnet-pay.crypt.bot/", apiToken: "9999:ABpPkivT2jiuVywaJbSGjfXFozOjQZfO3ZL" ));

2.1 Inject CryptoPay conector into you service & call the required method

public class CryptopayService { private readonly ICryptopay _cryptopay; public ConectorService(ICryptopay cryptopay) { _cryptopay = cryptopay; } } ... var answer = await _cryptopay.GetMeAsync();

2 Use simple initialization

2.1 Initialize CryptopayCredentials

var creds = new CryptopayCredentials( apiUrl: "https://testnet-pay.crypt.bot/", apiToken: "9999:ABpPkivT2jiuVywaJbSGjfXFozOjQZfO3ZL" );

2.2 Create connector instance & call the required method

using var cryptopay = Connector.GetIstance(new HttpClient(), creds); var answer = await cryptopay.GetMeAsync();

You can thank here --> Mono Bank donate " or here --> TON donate "

About

API wrapper for Crypto Pay API https://telegra.ph/Crypto-Pay-API-11-25

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages