Not able to delete a Credit Card profile using ResDelete API

Hi Team,

We have been undergoing this issue for long time now. We are able to add a Credit card profile to Vault using ResAddToken. When we try to delete the card profile created earlier, its not getting deleted and we get ResSuccess as false in response. Could you please help us in fixing the issue.

 

We use c# .net, eSELECTplus_dotNet_API version is 1.0.14.0. Please find our code below

 

string store_id = "store1";
string api_token = "yesguy";
string processing_country_code = "CA";
bool status_check = false;
string panno = "5454545454545454";
string expdate = "1901"; //YYMM format
string crypt_type = "7";
string durations = "900";
string customerID = "655011";

//Creating a temp token

ResTempAdd resTempAdd = new ResTempAdd();
resTempAdd.SetPan(panno);
resTempAdd.SetExpDate(expdate);
resTempAdd.SetDuration(durations);
resTempAdd.SetCryptType(crypt_type);


HttpsPostRequest mpgReq1 = new HttpsPostRequest();
mpgReq1.SetProcCountryCode(processing_country_code);
mpgReq1.SetTestMode(true); //false or comment out this line for production transactions
mpgReq1.SetStoreId(store_id);
mpgReq1.SetApiToken(api_token);
mpgReq1.SetTransaction(resTempAdd);
mpgReq1.SetStatusCheck(status_check);
mpgReq1.Send();

Receipt receipttemptoken = mpgReq1.GetReceipt();

//Covert a temp token to permanent token and added to Vault

ResAddToken resAddToken = new ResAddToken();
resAddToken.SetDataKey(receipttemptoken.GetDataKey());
resAddToken.SetCryptType(crypt_type);
resAddToken.SetExpDate(expdate);
resAddToken.SetCustId(customerID);

HttpsPostRequest mpgReq2 = new HttpsPostRequest();
mpgReq2.SetProcCountryCode(processing_country_code);
mpgReq2.SetTestMode(true); //false or comment out this line for production transactions
mpgReq2.SetStoreId(store_id);
mpgReq2.SetApiToken(api_token);
mpgReq2.SetTransaction(resAddToken);
mpgReq2.SetStatusCheck(status_check);
mpgReq2.Send();

Receipt receiptpermtoken = mpgReq2.GetReceipt();

 

//Delete the Credit card profile created earlier and the ResSucess comes as "False"
ResDelete resDelete = new ResDelete(receiptpermtoken.GetDataKey());


HttpsPostRequest mpgReq3 = new HttpsPostRequest();

mpgReq3.SetProcCountryCode(processing_country_code);
mpgReq3.SetTestMode(true); //false or comment out this line for production transactions
mpgReq3.SetStoreId(store_id);
mpgReq3.SetApiToken(api_token);
mpgReq3.SetTransaction(resDelete);
mpgReq3.SetStatusCheck(status_check);
mpgReq3.Send();

Receipt receipt = mpgReq3.GetReceipt();