
a) First install BitPay C# Client through Nuget Package Manager
Install-Package BitPay
b) Client Initiated Paring
String clientName = "server 1";
BitPay bitpay = new BitPay(clientName);
if (!bitpay.clientIsAuthorized(BitPay.FACADE_POS))
{
// Get POS facade authorization code.
String pairingCode = bitpay.requestClientAuthorization(BitPay.FACADE_POS);
// Signal the device operator that this client needs to be paired with a merchant account.
System.Diagnostics.Debug.WriteLine("Info: Pair this client with your merchant account using the pairing code: " + pairingCode);
throw new BitPayException("Error: client is not authorized for POS facade.");
}
c) Server Initiated Paring
// Obtain a pairingCode from your BitPay account administrator.
String pairingCode = "xxxxxxx";
String clientName = "server 1";
BitPay bitpay = new BitPay(clientName);
// Is this client already authorized to use the POS facade?
if (!bitpay.clientIsAuthorized(BitPay.FACADE_POS))
{
// Get POS facade authorization.
bitpay.authorizeClient(pairingCode);
}
An example with invoice is provided here (
https://github.com/bitpay/csharp-bitpay-client/blob/master/GUIDE.md )
Hope that helps
--
Thanks & Regards,
RNA Team
Only4ram, if this helps please login to Mark As Answer. | Alert Moderator