<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                為了保證兼容性,可升級和易維護,不要修改 M2 默認代碼,要在獨立的模塊中添加自定義部分的代碼。 你可以使用 Magento_SamplePaymentGateway 模塊樣板代碼](https://github.com/magento/magento2-samples/tree/master/sample-module-payment-gateway) 這部分的代碼,在此之上自定義模塊結構和對應的文件。 ## 指明模塊依賴 自定義支付方式對應的模塊必須包含如下依賴: - Magento_Sales 模塊:用來獲取訂單詳情 - Magento_Payment 模塊,用來使用 M2 提供的支付網關基礎設施 - Magento_Checkout 模塊,用來將新的支付方式添加到 checkout, 如果你不打算在網站前臺的 checkout 使用對應的支付方式,這個依賴不是必須的 - 在 `composer.json` 和 `module.xml` 文件中指明對應的依賴項 ### composer.json 在你的 `%Vendor_Module%/composer.json` 文件中,按照如下示例申明依賴: ```php { ... "require": { ... "magento/module-payment": "100.1.*", "magento/module-checkout": "100.1.*", "magento/module-sales": "100.1.*", ... }, ... } ``` 關于 composer.json 的細節,參考[這里](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/composer-integration.html) ### module.xml 在 `%Vendor_Module%/etc/module.xml` 中按照如下示例添加同樣的依賴項: ```php <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Vendor_Module" setup_version="2.0.0"> <sequence> ... <module name="Magento_Sales"/> <module name="Magento_Payment"/> <module name="Magento_Checkout"/> ... </sequence> </module> </config> ``` > 備注:**你的支付方式可能有更多的依賴項,請根據實際情況添加**
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看