在 Netsuite 中创建新销售订单时如何设置 Paypal 授权 ID
我尝试使用 PHPtoolkip_v2010.php 在 Netsuite 中创建一个新的销售订单,并将授权 ID 添加到其付款方式。
我可以创建销售订单并将付款方式设置为 PayPal,但无法设置 AuthId。如果我尝试设置事务 ID,我会成功,但一旦我切换代码进行身份验证,它就会失败。
这是我正在尝试的代码片段:
$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);
如果我通过 API 和 var_dump
获取现有的 Paypal 订单,我会看到字段 payPalTranId
和 paypalAuthId已设置。请注意,Paypal 中的秒 P 对于 TranId 而言是大写的,但对于 AuthId 而言则不是。但我已经尝试了 AuthId 的上限和未上限,但没有结果。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
希望您能顺利解决问题。
您是否尝试启用“覆盖 PayPal 设置”字段?
我正在尝试从外部网上商店和authid引入PayPal信息,在阅读您的帖子时查看此字段。
Hope you got it straightened out and sucessfully.
Did you try to enable the "Override PayPal Settings " field?
I am trying to bring in PayPal information from external webstore and authid, looking at this field as reading your posting.
看来我想做的事情是不可能的了。
我在 Celigo 公司找到了此声明专门致力于将 Magento 与 Netsuite 集成。
虽然他们没有明确声明我无法设置 AuthId,但我这样做的目标是在 Netsuite 外部授权付款并在内部捕获。如果这是不可能的,那么设置 AuthId 对我来说毫无意义。
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.