Skip to Content
Former Member
Oct 01, 2009 at 02:53 PM

Credit Card Verification Codes Not Loading All The Time


I've been loading NPOrder objects to obtain the NPOrderPayment objects contained in the Payment member. It seems like sometimes the verification code decrypts correctly, but other times a value of "9dYzocKjDdPP+l8Unv3PKw==" appears instead. I am retrieving the code as follows: npc = // Create a connection
string privateKey = // Obtain the private key for the website
int OrderID = 200000;  // Some arbitrary order ID
NPOrder o = new NPOrder(Convert.ToInt32(OrderID), npc, privateKey);
NPOrderPayment op = ((NPOrderPayment)(o.Payments[0]));
int VerificationCode = op.VerificationCode;

When the verification code comes back incorrectly, it is always the same encrypted value. Why is this the case? How is the VerificationCode handled/encrypted? All I want to do is get the code for each payment.