Hi,
I am getting an exception :The type initializer for 'Asi.Security.AppPrincipal' threw an exception
var payment = new CPayment(CStaffUser.GetDefaultStaffUser())
{
CashAccountCode = "VISA",
CreditCardNumber = "4007000000027"
};
I have tried this as well:
IiMISUser user1 = CContactUser.LoginByWebLogin("33232"); OR IiMISUser user1 = CStaffUser.Login("Manager", "ddsd432");
then
Payment = new CPayment(user1);
Payment.Amount = 120;
Payment.PaymentType = EnumPaymentType.CreditCard;
Payment.CreditDebitCardAuthorizationCode = "123";
Payment.CreditCardSecurityCode = "123";
Payment.CreditCardExpiration = "12/50";
Payment.CreditDebitCardHoldersName = "Name";
Payment.CreditCardNumber = "41111111111111111";
Payment.CashAccountCode = "VISA";
Payment.Validate();
the exception happesn at credit card number line,
is there some process i need to follow when creating user, and insert payment for that product?
or
is there any IMIS setup I need to do in IMIS Desktop ??
Thanks
card number length?
4007000000027 is a 13-digit VISA number; I'm not sure if that's a valid test number for that length or not.
41111111111111111 from your code sample is 17 digits long.
Try "4111111111111111" - 4 followed by 15 1s - in both code snippets, to see if you get better results.