调用 Prestashop postProcess 方法

问题描述

我实际上正在为 Prestashop 1.7 开发一个付款方式模块,但现在我在我的付款 方法中遇到了postProcess() > 页面,该方法会在付款页面加载时立即调用。你知道为什么会这样吗?我的 payment.tpl一个简单的 html 表单来执行 POST 请求。

提前致谢。

解决方法

解决了。它需要验证,因为 postProcess 在 init() 之后和 initContent() 之前运行:

public function postProcess()
{
    if (!empty($_POST))
    {
    // Magic here!
    }
}