Mark Tabor

Mark Tabor

  • 561
  • 2k
  • 450.8k

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)