Is it possible with suitescript to create a paymen...
# suitescript
d
Is it possible with suitescript to create a payment card or payment token on a customer record?
s
let paymentCard = record.create({
type: record.Type.PAYMENT_CARD, isDynamic: true }); paymentCard.setValue({ fieldId: 'entity', value: helper.getAccountInternalId(param.accountNumber) }); paymentCard.setValue({ fieldId: 'cardnumber', value: param.creditCard.number }); paymentCard.setText({ fieldId: 'expirationdate', text:
${param.creditCard.month}/${param.creditCard.year}
}); paymentCard.setValue({ fieldId: 'paymentmethod', value: '4' }); paymentCard.setValue({ fieldId: 'nameoncard', value: param.accountNumber }); paymentCard.setValue({ fieldId: 'preserveonfile', value: true }); paymentCard.save({ ignoreMandatoryFields: false });
b
the answer is yes, but in general you dont want to do payment cards like done in the example above
making a script that has access to actual credit card numbers expands your responsibilities for pci compliance
the example above means access to the script is the same as access to credit card numbers
d
@battk we need to pass in tokens not CC numbers