CC_PROCESSOR_NOT_FOUND : credit card processor issue in suitelet script.

Issue in Brief

SuiteScript error while creating Payment record from invoice using suitelet.

Error Code: CC_PROCESSOR_NOT_FOUND

Message: A suitable credit card processing profile not found for this transaction.

Script type: Suitelet.

Purpose of the script: A payment needs to created from an Invoice.

Gateway Service provider: Payflow Pro

image.png

Script

 

/**
* @NApiVersion 2.x
* @NScriptType suitelet
* @NModuleScope SameAccount
*/
define([‘N/record’],function(record){
varisCreditCard = true;
functiononRequest(context)
{
try {
varstatus = createPayment(941042,117719);
log.error(‘status’,status)
}catch(err)
{
log.debug(‘error@Onrequest’,err)
}
}
functioncreatePayment(invoiceId, cardId) {
try {
varcardIdInt = parseInt(cardId)
varvalidCard = !isNaN(cardIdInt);
if (isCreditCard) {
if (validCard) {
varpaymentRecord = record.transform({
fromType:record.Type.INVOICE,
fromId:invoiceId,
toType:record.Type.CUSTOMER_PAYMENT,
isDynamic:true,
});
// paymentRecord.setValue({ fieldId: “ccprocessoraccount”, value: 126 });
// paymentRecord.setValue({fieldId: “creditcardprocessor”});
log.error(‘getTest’, paymentRecord.getValue({fieldId:”creditcardprocessor”}));
paymentRecord.setValue({fieldId:”creditcard”, value:cardIdInt});
paymentRecord.setValue({fieldId:”payment”, value:0.01 });
paymentRecord.setValue({fieldId:”account”, value:126});
varpaymentRecordId = paymentRecord.save();
log.debug(‘paymentRecordId’,paymentRecordId);
//var paymentRecordId = 123;
return {
isSuccess:true,
paymentId:paymentRecordId
};
}
} else {
return {
isSuccess:true,
paymentId:null
};
}
} catch (e) {
log.debug(“@createPayment”, e);
log.error(“@createPayment”, e);
}
}
return {
onRequest:onRequest
}
})

Assumptions and findings

We noticed that in upcoming Netsuite 2020.2 release. Netsuite is planning to forcefully introduce the”USE STRICT RULES FOR THE SELECTION OF PAYMENT PROCESSING PROFILES”. One of our clients reported an issue in Suitelet context while checking the ‘USE STRICT RULES FOR THE SELECTION OF PAYMENT PROCESSING PROFILES’ checkbox. We investigated and reached the following findings.

  1. It is working from UI Context in all cases.
  2. It is returning the “CC_PROCESSOR_NOT_FOUND” in suitelet when the checkbox is enabled.
  3. No issues while working with suitelet when the preference checkbox is unchecked.

The subsidiary configured in Payment processing profile.

Could you please help us to fix it?

 

Rookie Asked on July 23, 2020 in SuiteScript.

I’m probably stating the obvious, but it looks like none of the existing payment processing profiles support this combo: selected payment method (this is automatically sourced when you set the credit card), currency and subsidiary. I would try to log the values of the Payment Method subtab right before saving the record just to see what’s in there. Also, try to “force” (setValue) of the Payment Method or Processor and see what happens. Good luck!

on September 11, 2020.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor