CPayment - CreditCardNumber Exception

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Asi.iBO;
using Asi.iBO.Financials;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                IiMISUser user = CStaffUser.Login("Manager", "Test1234");
                CPayment Payment = new CPayment(user);
                Payment.Amount = 120;
                Payment.PaymentType = EnumPaymentType.CreditCard;
                Payment.CreditCardNumber = "4444333322221111";
                Payment.CreditDebitCardHoldersName = "Name";
                Payment.CreditDebitCardAuthorizationCode = "123";
                Payment.CreditCardSecurityCode = "123";
                Payment.CreditCardExpiration = "12/50";
                Payment.CashAccountCode = "VISA";
                Payment.Validate();
            }
            catch (Exception exception)
            {
                throw new Exception(exception.Message);
            }
        }
    }
}

 

 

this line is having the exception:
                Payment.CreditCardNumber = "4444333322221111";

i tried also: 4007000000027 & 011201539123

 

the exception is: {"The type initializer for 'Asi.Security.AppPrincipal' threw an exception."}

what am doing wrong??

thanks

 

 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Change            

Change

                IiMISUser user = CStaffUser.Login("Manager", "Test1234");

to

                IiMISUser user = CStaffUser.Login("Manager");
 

Thanks,

Randy Richter

Directory, Technology Solutions/Partner

Association Technology Solutions

http://www.atsol.org/

Error 4 No overload for method 'Login' takes 1 arguments

Error    4    No overload for method 'Login' takes 1 arguments  

 

LoginbyWebLogin

I stated that incorrectly. Use the method LoginbyWebLogin with just the username parameter.

 

Thanks,

Randy