示例#1
0
        static void Main(string[] args)
        {
            RSACryptoServiceProvider rsa = (RSACryptoServiceProvider)RSACryptoServiceProvider.Create();

            using (StreamReader pemFile = File.OpenText("su.pem"))
            {
                rsa.LoadPrivateKeyPEM(pemFile.ReadToEnd());
            }
            MerchantApiClient client = new MerchantApiClient("c8kqcf", "su", rsa);

            LogResponse(client.Get("/merchant/" + client.merchantId + "/"));
            LogResponse(client.Post("/pos/", "{\"id\": \"pos1\", \"name\":\"pøs1\", \"type\":\"store\"}"));
            LogResponse(client.Delete("/pos/pos1/"));
        }
示例#2
0
 static void Main(string[] args)
 {
     RSACryptoServiceProvider rsa = (RSACryptoServiceProvider)RSACryptoServiceProvider.Create();
     using (StreamReader pemFile = File.OpenText("su.pem"))
     {
         rsa.LoadPrivateKeyPEM(pemFile.ReadToEnd());
     }
     MerchantApiClient client = new MerchantApiClient("c8kqcf", "su", rsa);
     LogResponse(client.Get("/merchant/" + client.merchantId + "/"));
     LogResponse(client.Post("/pos/", "{\"id\": \"pos1\", \"name\":\"pøs1\", \"type\":\"store\"}"));
     LogResponse(client.Delete("/pos/pos1/"));
 }
示例#3
0
 public MerchantApiTests()
 {
     _merchantApiClient = new MerchantApiClient(new RevolutSimpleClient(Config.MERCHANTAPIKEY, Config.MERCHANTENDPOINT));
 }