微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

PayPal Virtuemart 集成 - 如何在 Paypal 请求数组中输入自定义金额

如何解决PayPal Virtuemart 集成 - 如何在 Paypal 请求数组中输入自定义金额

我正在使用威德玛特进行 PayPal 集成。 根据购物车中的值,我正在编辑和修改自定义定价的值。

$this->cart->cartPrices['billTotal'] = $totalPriceEuro;

我无法修改发送到 Paypal 请求数组的值,如图所示

我在 helpers/paypalstd.PHP 的第 64 行找到了一个可能的线索:$post_variables['amount'] = $this->total;

以及第 158 行的 helpers/paypal.PHP :公共函数 setTotal ($total),其中设置了 $this->total。

此外,似乎 setTotal 正在从购物车中获取其价值: $paypalInterface->setTotal($cart->cartPrices['billTotal']);

由于我确实更改了 cartPrices 中的 billTotal ([billTotal] => 287.266),这让问题变得更加烦人。

作为额外的测试,我收集了 VMModel 订单,以检查 Order_details:

$curOrderID = $this->cart->virtuemart_order_id;
$thisOrderByID = $orderModel->getorder($curOrderID);
$thisOrderByID['details']['BT']->order_total = $totalPriceEuro;
$thisOrderByID['details']['BT']->order_salesPrice = $totalPriceEuro;
$thisOrderByID['details']['BT']->order_subtotal = $totalPriceEuro;

修改也没有用:)

enter image description here

购物车中的价值没有反映在 PayPal 插件中,这有点奇怪。

如果有人能帮助回答这个问题,这样我就可以根据购物车中的自定义值确定定价,那就太好了?

谢谢!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。