I am attempted to create a new Sales Order in Netsuite using PHPtoolkip_v2010.php and add a authorization id to its payment method.
I can create the Sales Order and set the payment method to PayPal, but I am unable to set the AuthId. If I try to set the Transaction Id I’m successful, but as soon as I switch the code to do an auth it fails.
Here’s a snippet of the code I’m trying:
$sales_order_data = array(
'entity'=> new nsRecordRef(array('internalId' => $customer_id)),
'tranDate'=>date('c', strtotime($order_date)),
'itemList'=>array('item'=>array()),
);
//...
$sales_order_data['paymentMethod'] = array('internalId'=>7);
//$sales_order_data['payPalTranId'] = $paypal_transaction_id;
$sales_order_data['paypalAuthId'] = $paypal_transaction_id;
$sales_order = new nsComplexObject('SalesOrder', $sales_order_data);
$new_sales_order = $ns->add($sales_order);
If I get an existing Paypal order through the API and var_dump it I see the fields payPalTranId and paypalAuthId are set. Notice that the seconds P in Paypal is capitalized for the TranId but not for the AuthId. But I have tried both capped and uncapped for AuthId with no results.
It looks like what I wanted to do was impossible.
I’ve found this statement on from Celigo, a company that specializes in integrating Magento with Netsuite.
While they don’t explicitly state that I can’t set the AuthId, my goal in doing so was to authroize the payment outside of Netsuite and capture within. If that’s not possible, then setting the AuthId is pointless for me.