Esempio n. 1
0
 private async Task CallTransactByCardWebService(string fromAccountNumber, string toAccountNumber, string cardSerialNumberFrom, string cardSerialNumberTo, long?amount, TransactionType transactionType, TLV emvData)
 {
     Device.BeginInvokeOnMainThread(() =>
     {
         gridProgress.IsVisible = true;
     });
     try
     {
         Proxies.DCEMVDemoServerClient client = SessionSingleton.GenDCEMVServerApiClient();
         using (SessionSingleton.HttpClient)
         {
             CardTransferTransaction tx = new CardTransferTransaction()
             {
                 Amount          = amount.Value,
                 TransactionType = transactionType,
                 AccountFrom     = fromAccountNumber,
                 AccountTo       = toAccountNumber,
                 CardSerialFrom  = cardSerialNumberFrom,
                 CardSerialTo    = cardSerialNumberTo,
                 CardFromEMVData = TLVasJSON.ToJSON(emvData),
             };
             await client.TransactionCardtransferPostAsync(tx.ToJsonString());
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         Device.BeginInvokeOnMainThread(() =>
         {
             gridProgress.IsVisible = false;
         });
     }
 }