首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在magento中强制付款后的“涉嫌欺诈”状态?

在magento中强制付款后的“涉嫌欺诈”状态?
EN

Stack Overflow用户
提问于 2012-03-21 20:45:18
回答 2查看 10.2K关注 0票数 0

我已经在magento中制作了我的自定义模块,其中我已经动态地设置了折扣。为此,我使用了以下代码。但是当我完成付款程序后,订单状态应该是'processing‘,而不是这个订单状态变成了"Suspected Fraud“。

请让我知道我做错了什么。虽然在订单信息中成功添加了折扣。

代码语言:javascript
复制
$order->setData('base_discount_amount', $discountAmt);

$order->setData('base_discount_canceled', $discountAmt);

$order->setData('base_discount_invoiced', $discountAmt);

$order->setData('base_discount_refunded', $discountAmt);

$order->setData('discount_description', 'Affliate Discount');

$order->setData('discount_amount', $discountAmt);

$order->setData('discount_canceled', $discountAmt);

$order->setData('discount_invoiced', $discountAmt);

$order->setData('discount_refunded', $discountAmt);
EN

Stack Overflow用户

发布于 2017-07-09 14:25:20

我花了很长时间来解决这个0.10错误,

因此,我将与大家分享我的案例中的问题:

在:

/app/code/core/Mage/Paypal/模型/cart.php

有一个_validate函数,PayPal在其中检查$sum$referenceAmount之间的差异。

我将其替换为:

代码语言:javascript
复制
if (sprintf('%.4F', $sum) == sprintf('%.4F', $referenceAmount)) {
    $this->_areItemsValid = true;
}

我在升级前的Magento备份中找到的。

票数 0
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9804883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档