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 (将#修改为@)