【问题标题】:Magento pass extra info to payment gatewayMagento 将额外信息传递给支付网关
【发布时间】:2014-03-21 00:50:54
【问题描述】:

我正在尝试关注http://excellencemagentoblog.com/magento-create-custom-payment-method-api-based 建立支付网关。

一切正常。但我需要将数字签名传递给支付网关。

我想我应该将它添加到类 Excellence_Pay_Model_Pay assignData($data)

info = $this->getInfoInstance();
        $info->setCcType($data->getCcType())
            ->setCcOwner($data->getCcOwner())
            ->setCcLast4(substr($data->getCcNumber(), -4))
            ->setCcNumber($data->getCcNumber())
            ->setCcCid($data->getCcCid())
            ->setCcExpMonth($data->getCcExpMonth())
            ->setCcExpYear($data->getCcExpYear())
            ->setCcSsIssue($data->getCcSsIssue())
            ->setCcSsStartMonth($data->getCcSsStartMonth())
            ->setCcSsStartYear($data->getCcSsStartYear())
            ->setCcsignature($data->getCcsignature());

我又添加了一个字段:->setCcsignature($data->getCcsignature());

但我无法在 capture() 或 callApi() 函数中检索它。它一直是空的。我以为 ->setSsignature 会使用 php 魔术设置功能,不是吗?

任何提示和建议将不胜感激。

谢谢各位!

【问题讨论】:

    标签: magento payment-gateway


    【解决方案1】:

    看起来您必须使用 $info->getCcsignature() 检查值是否正在设置。设置值后,如果将其传递给 capture() 或 callApi() 函数。您只需要遵循调试的基本步骤即可。回声死,回声死等。祝你好运。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-28
      • 2013-12-07
      • 1970-01-01
      • 2013-05-22
      • 2015-07-01
      • 2016-08-11
      • 2014-05-15
      • 2014-08-22
      相关资源
      最近更新 更多