Magento 2:如何通过post方法从支付网关发送数据?

时间:2016-09-12 11:59:52

标签: payment-gateway magento2

Magento 2:如何通过邮政方式从支付网关发送数据?

2 个答案:

答案 0 :(得分:0)

我想您正在谈论从支付网关到Magento2设置的webhook,以便他们通知您离线付款。我建议你创建一个离线付款方式。然后创建一个可以处理此类信息的web-api端点。

您需要提供更多信息。

答案 1 :(得分:0)

根据我对Payflow pro magento 2.3.3的研究,通过以下方式将数据发送到支付网关。

vendor/magento/module-payment/view/frontend/web/js/transparent.js

_postPaymentToGateway: function (data) {
    var tmpl,
        iframeSelector = '[data-container="' + this.options.gateway + '-transparent-iframe"]';
    tmpl = this.hiddenFormTmpl({
        data: {
            target: $(iframeSelector).attr('name'),
            action: this.options.cgiUrl,
            inputs: data
        }
    });
    $(tmpl).appendTo($(iframeSelector)).submit();
}

具有上述功能的成功订单之后,将数据发布到支付网关。

相关问题