Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Adding a new credit card to a customer
I'm using the PHPtoolkit beta and can't seem to add a new credit card to an existing customer.
I can add a credit card.
I can replace all the current credit cards with a new one.
I can't add a second credit card.
[CODE]$creditCard = array(
'ccDefault' => false,
'ccExpireDate' => '2013-09-01T00:00:00.000-07:00',
'ccName' => 'Customer Name',
'ccNumber' => 5105105105105100,
'paymentMethod' => 4 // This means Master Card
);
$creditCardType = new nsRecordRef(array('internalId' => $creditCard['paymentMethod']));
$creditCard['paymentMethod'] = $creditCardType;
$creditCardObject = new nsComplexObject('CustomerCreditCardsList');
$creditCardObject->setFields(array('creditCards'=>(array($creditCard))));
$creditCardObject->setFields(array('replaceAll'=>'false'));
$customer = new nsComplexObject('Customer');
I can add a credit card.
I can replace all the current credit cards with a new one.
I can't add a second credit card.
[CODE]$creditCard = array(
'ccDefault' => false,
'ccExpireDate' => '2013-09-01T00:00:00.000-07:00',
'ccName' => 'Customer Name',
'ccNumber' => 5105105105105100,
'paymentMethod' => 4 // This means Master Card
);
$creditCardType = new nsRecordRef(array('internalId' => $creditCard['paymentMethod']));
$creditCard['paymentMethod'] = $creditCardType;
$creditCardObject = new nsComplexObject('CustomerCreditCardsList');
$creditCardObject->setFields(array('creditCards'=>(array($creditCard))));
$creditCardObject->setFields(array('replaceAll'=>'false'));
$customer = new nsComplexObject('Customer');
0