我正在爲位於Webstore之外的NS構建一個前端。我們的付款網關有一個網絡應用程序,它可以創建一個參考號和授權碼,這些需要附加到銷售訂單上,以便付款提供商可以在訂單發送時處理付款。這是可能的還是我吠叫錯了樹?NetSuite:改變salesorder在物品履行前添加信用卡authCode和pnRefNum
我很新的NS,道歉,如果答案是明顯的!
我得到的錯誤信息是:
Code: INVALID_RCRD_TRANSFRM Details: That type of record transformation is not allowed. Please see the documentation for a list of supported transformation types.
,這裏是我想在我的Restlet使用代碼:
function authorizeCreditCard(dataIn) {
nlapiLogExecution('DEBUG', 'Pre Transform', JSON.stringify(dataIn));
var customerpayment, paymentrecord
try {
customerpayment = nlapiTransformRecord('salesorder', dataIn.id, 'customerpayment', {
"memo": dataIn.memo,
"authCode": dataIn.authCode,
"pnRefNum": dataIn.pnRefNum,
"ccApproved": dataIn.ccApproved,
"ccAvsStreetMatch": dataIn.ccAvsStreetMatch,
"ccAvsZipMatch": dataIn.ccAvsZipMatch,
"ccSecurityCodeMatch": dataIn.ccSecurityCodeMatch
});
paymentrecord = nlapiSubmitRecord(customerpayment);
} catch (e) {
nlapiLogExecution('ERROR', 'Transform failed', e);
}
nlapiLogExecution('DEBUG', 'Post Transform: CP', JSON.stringify(customerpayment));
nlapiLogExecution('DEBUG', 'Post Transform: PR', JSON.stringify(paymentrecord));
if (paymentrecord) {
return {
status: 'success',
data: paymentrecord
}
}
return {
status: 'error',
message: 'something went wrong'
}
}
我們使用相同的網關進行身份驗證和處理,以便希望部分能夠正常工作。您是否缺少您的示例中的authcode,是否需要付款? – designreact
編號只是p/n參考 – bknights