Mark Tabor

Mark Tabor

  • 942
  • 1.6k
  • 294.6k

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)