在 Netsuite 中创建新销售订单时如何设置 Paypal 授权 ID

发布于 2024-12-26 14:50:43 字数 937 浏览 1 评论 0原文

我尝试使用 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 订单,我会看到字段 payPalTranIdpaypalAuthId已设置。请注意,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我的影子我的梦 2025-01-02 14:50:44

希望您能顺利解决问题。
您是否尝试启用“覆盖 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.

无需解释 2025-01-02 14:50:43

看来我想做的事情是不可能的了。

我在 Celigo 公司找到了此声明专门致力于将 Magento 与 Netsuite 集成。

授权和捕获都必须在 Magento 端完成。
NetSuite 不利于捕获已发生的付款
在 NetSuite 外部授权。需要设置的NetSuite字段
指示授权状态,“PayPal Status”是只读的
因此无法设置。交易无法处理,除非
该字段已设置。

虽然他们没有明确声明我无法设置 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.

Both authorization and capture must be done on the Magento side.
NetSuite does not facilitate capture of payments that have been
authorized outside NetSuite. The NetSuite field that needs to be set
to indicate the authorization status, ‘PayPal Status’, is read-only
and thus cannot be set. The transaction cannot be processed unless
this field is set.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文