I am working on ASP.NET MVC website where users pays some amount of bitcoins and after payment he can download specific digital art file. Instant payment and download.
I have found nuget package Coinpayments.NET.
https://www.nuget.org/packages/Coinpayments.NET/
I can't find any example how to use this nuget package with ASP.NET MVC.
Reading documentation on official website which is for PHP doesn't help.
Please help me and if You can provide some example how to make transaction and after successfull payment redirect user to specified action.
Edit: I have sample source code:
using System;
namespace CoinpaymentsTest
{
class Program
{
static void Main(string[] args)
{
var cp = new Coinpayments.Coinpayments("PRIVATEKEY", "PUBLICKEY");
var payment = cp.CreateTransactionSimple(2, "USD", "BTC", "ADDRESS", "IPN");
Console.WriteLine(payment.error);
Console.WriteLine(payment.result.qrcode_url);
var check = cp.GetTransactionInfo(payment.result.txn_id);
Console.WriteLine(check.result.payment_address);
Console.Read();
}
}
}
But the question is how to get information that user has successfully paid?
I need explanation on this source code.