Example #1
0
 /// <summary>
 /// Payment Information
 /// </summary>
 /// <param name="type">Type. Eg: CredictCard, DebitCard, Eletronic Transfer, etc.</param>
 /// <param name="amount">Total purchase value</param>
 /// <param name="provider">Provider name</param>
 /// <param name="returnUrl">Url which user will be redirect after finish the payment process.</param>
 public Payment(PaymentType type,
                decimal amount,
                EletronicTransferProvider provider,
                string returnUrl)
 {
     Type      = type.ToString();
     Amount    = (int)(amount * 100);
     Provider  = provider.ToString();
     ReturnUrl = returnUrl;
 }
Example #2
0
        public void ToDescription_ShouldReturnEnumToStringWhenThereIsNoDescriptionAttribute()
        {
            EletronicTransferProvider provider = EletronicTransferProvider.BancodoBrasil;

            provider.ToDescription().Should().Be(EletronicTransferProvider.BancodoBrasil.ToString());
        }