Mark Tabor

Mark Tabor

  • 589
  • 2k
  • 460.2k

How to check zero of newly creation object

Nov 27 2021 7:16 PM

 var charge = charges.Create(new ChargeCreateOptions
            {
             
                 Amount = (long)transectionModel.Charge * 100,
                Description = "Test Payment",
                Currency = "USD",
                Customer = customer.Id
            });

 

when amount is zero code thorow exception how to handle ZERO in amount variabel 


Answers (3)