static void Main(string[] args) { String pairingCode = "uGhQ6vx"; String host = "btcpaytest.indiesquare.net"; BTCPayClient bitpay = new BTCPayClient(new MonoBehaviour(), pairingCode, host); //New Invoice Prep Invoice invoice = new Invoice(1.0, "USD"); invoice.BuyerName = "Masashi"; invoice.BuyerEmail = "*****@*****.**"; invoice.FullNotifications = true; invoice.NotificationEmail = "*****@*****.**"; invoice.PosData = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; invoice.ItemDesc = "Test Description"; //Create Invoice bitpay.createInvoice(invoice, printInvoice); //Get Invoice bitpay.getInvoice(invoice.Id, printInvoice); //Subscribe Invoice to change //bitpay.subscribeInvoice(invoice.Id, printInvoice); }
void Start() { //Instantiate the BTCPayClient Object with server-initiated pairing code and hostname of BTCpay server //Once instantiated, it will generate a new private key if not there, and SIN ,which is derived from public key. //then registered on BTCPay server //BTCpayCleintをインスタンス化する。BTCPayServerで取得したペアリングコードをとホスト名をセット //秘密鍵ファイルがワーキングディレクトリに作成され、公開鍵から作られたBitcoinアドレスのようなSINがBTCPayServerに登録される。 btcPayClient = new BTCPayClient(pairCode, btcpayServerHost); }