私はWebストアの外にあるNSのフロントエンドを構築しています。私たちの決済ゲートウェイには、注文番号が発行されたときに支払いプロバイダが支払いを処理できるように、受注番号と認証コードを作成できるWebアプリがあり、受注に追加する必要があります。これは可能ですか、間違った木を鳴らしていますか?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 ref – bknights