How to send post data with redirect from magento 2 for a payment gateway?Send order information to a third party payment gatewayHow to integrate Payment gateway with Magento 2 REST API?Magento 2 checkout new field is excluded from post dataMagento 2 Redirect to 3rd party payment gateway with post dataHow to send post data with redirect from magento 2?Magento 2: Redirect from Observer Not Working on Category PageHow to post data to a payment provider when placing an order in Magento 2Magento 2 Payment Redirect Gateway Update OrderExternal URL post redirect without intermediate page (white page) in Magento 1.9.x

When quoting someone, is it proper to change "gotta" to "got to" without modifying the rest of the quote?

Ex-manager wants to stay in touch, I don't want to

Exception propagation: When to catch exceptions?

Can 'sudo apt-get remove [write]' destroy my Ubuntu?

How to make a language evolve quickly?

Is it a Munchausen Number?

Peculiarities in low dimensions or low order or etc

Are there variations of the regular runtimes of the Big-O-Notation?

How is CoreiX like Corei5, i7 is related to Haswell, Ivy Bridge?

How to handle DM constantly stealing everything from sleeping characters?

Is it bad writing or bad story telling if first person narrative contains more information than the narrator knows?

Why does increasing the sampling rate make implementing an anti-aliasing filter easier?

Are there non-military uses of 20%-enriched Uranium?

Why should password hash verification be time constant?

Is ‘despite that’ right?

Two researchers want to work on the same extension to my paper. Who to help?

Intersecting with the x-axis / intersecting the x-axis

Should I pay on student loans in deferment or continue to snowball other debts?

Why is the Sun made of light elements only?

Has there been evidence of any other gods?

date -d 'previous Monday" to display the preceding Monday

Names of the Six Tastes

The meaning of a て-form verb at the end of this sentence

If a character drops a magic item that turns on/off, does that item turn off when they drop it?



How to send post data with redirect from magento 2 for a payment gateway?


Send order information to a third party payment gatewayHow to integrate Payment gateway with Magento 2 REST API?Magento 2 checkout new field is excluded from post dataMagento 2 Redirect to 3rd party payment gateway with post dataHow to send post data with redirect from magento 2?Magento 2: Redirect from Observer Not Working on Category PageHow to post data to a payment provider when placing an order in Magento 2Magento 2 Payment Redirect Gateway Update OrderExternal URL post redirect without intermediate page (white page) in Magento 1.9.x






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















we use magento2/app/code/Paymentgateway/Example/Controller/Standard/Redirect.php



public function execute()
{
$order = $this->getOrder();
if ($order->getBillingAddress())

$this->getResponse()->setRedirect(
$this->getExampleModel()->buildExampleRequest($order)
);



Any suggestions??










share|improve this question






























    4















    we use magento2/app/code/Paymentgateway/Example/Controller/Standard/Redirect.php



    public function execute()
    {
    $order = $this->getOrder();
    if ($order->getBillingAddress())

    $this->getResponse()->setRedirect(
    $this->getExampleModel()->buildExampleRequest($order)
    );



    Any suggestions??










    share|improve this question


























      4












      4








      4


      1






      we use magento2/app/code/Paymentgateway/Example/Controller/Standard/Redirect.php



      public function execute()
      {
      $order = $this->getOrder();
      if ($order->getBillingAddress())

      $this->getResponse()->setRedirect(
      $this->getExampleModel()->buildExampleRequest($order)
      );



      Any suggestions??










      share|improve this question
















      we use magento2/app/code/Paymentgateway/Example/Controller/Standard/Redirect.php



      public function execute()
      {
      $order = $this->getOrder();
      if ($order->getBillingAddress())

      $this->getResponse()->setRedirect(
      $this->getExampleModel()->buildExampleRequest($order)
      );



      Any suggestions??







      magento2 payment-methods payment redirect post-data






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 5 '16 at 8:18









      Marius

      169k28324695




      169k28324695










      asked Sep 5 '16 at 8:14









      Ayush MittalAyush Mittal

      3001516




      3001516




















          2 Answers
          2






          active

          oldest

          votes


















          0














          Create a custom hidden from this submit and using window.load function submit form.



          • Create a form with required fields and value to payment gateway.

          • Make all fields as hidden type

          • Then make this form action url to your pg

          • And using window.load submit this form





          share|improve this answer























          • not success yet please provide an example

            – Ayush Mittal
            Sep 5 '16 at 9:39











          • any success!? if yes please post here

            – sIiiS
            Sep 29 '16 at 23:12


















          0














          Create a from in your template file with submit URL and also create a block function that return all data that you need to submit.



          Here is the sample code for the same.



          <form action="Submit-URL-HERE" method="POST" name="fromPay">
          <?php foreach ($this->getDataToSubmit() as $name => $value): ?>
          <input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>" />
          <?php endforeach; ?>
          </form>
          <script language="JavaScript" type="text/javascript">
          <!--
          document.forms['fromPay'].submit();
          -->
          </script>





          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f134728%2fhow-to-send-post-data-with-redirect-from-magento-2-for-a-payment-gateway%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Create a custom hidden from this submit and using window.load function submit form.



            • Create a form with required fields and value to payment gateway.

            • Make all fields as hidden type

            • Then make this form action url to your pg

            • And using window.load submit this form





            share|improve this answer























            • not success yet please provide an example

              – Ayush Mittal
              Sep 5 '16 at 9:39











            • any success!? if yes please post here

              – sIiiS
              Sep 29 '16 at 23:12















            0














            Create a custom hidden from this submit and using window.load function submit form.



            • Create a form with required fields and value to payment gateway.

            • Make all fields as hidden type

            • Then make this form action url to your pg

            • And using window.load submit this form





            share|improve this answer























            • not success yet please provide an example

              – Ayush Mittal
              Sep 5 '16 at 9:39











            • any success!? if yes please post here

              – sIiiS
              Sep 29 '16 at 23:12













            0












            0








            0







            Create a custom hidden from this submit and using window.load function submit form.



            • Create a form with required fields and value to payment gateway.

            • Make all fields as hidden type

            • Then make this form action url to your pg

            • And using window.load submit this form





            share|improve this answer













            Create a custom hidden from this submit and using window.load function submit form.



            • Create a form with required fields and value to payment gateway.

            • Make all fields as hidden type

            • Then make this form action url to your pg

            • And using window.load submit this form






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 5 '16 at 8:56









            Amit BeraAmit Bera

            60.5k1678178




            60.5k1678178












            • not success yet please provide an example

              – Ayush Mittal
              Sep 5 '16 at 9:39











            • any success!? if yes please post here

              – sIiiS
              Sep 29 '16 at 23:12

















            • not success yet please provide an example

              – Ayush Mittal
              Sep 5 '16 at 9:39











            • any success!? if yes please post here

              – sIiiS
              Sep 29 '16 at 23:12
















            not success yet please provide an example

            – Ayush Mittal
            Sep 5 '16 at 9:39





            not success yet please provide an example

            – Ayush Mittal
            Sep 5 '16 at 9:39













            any success!? if yes please post here

            – sIiiS
            Sep 29 '16 at 23:12





            any success!? if yes please post here

            – sIiiS
            Sep 29 '16 at 23:12













            0














            Create a from in your template file with submit URL and also create a block function that return all data that you need to submit.



            Here is the sample code for the same.



            <form action="Submit-URL-HERE" method="POST" name="fromPay">
            <?php foreach ($this->getDataToSubmit() as $name => $value): ?>
            <input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>" />
            <?php endforeach; ?>
            </form>
            <script language="JavaScript" type="text/javascript">
            <!--
            document.forms['fromPay'].submit();
            -->
            </script>





            share|improve this answer



























              0














              Create a from in your template file with submit URL and also create a block function that return all data that you need to submit.



              Here is the sample code for the same.



              <form action="Submit-URL-HERE" method="POST" name="fromPay">
              <?php foreach ($this->getDataToSubmit() as $name => $value): ?>
              <input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>" />
              <?php endforeach; ?>
              </form>
              <script language="JavaScript" type="text/javascript">
              <!--
              document.forms['fromPay'].submit();
              -->
              </script>





              share|improve this answer

























                0












                0








                0







                Create a from in your template file with submit URL and also create a block function that return all data that you need to submit.



                Here is the sample code for the same.



                <form action="Submit-URL-HERE" method="POST" name="fromPay">
                <?php foreach ($this->getDataToSubmit() as $name => $value): ?>
                <input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>" />
                <?php endforeach; ?>
                </form>
                <script language="JavaScript" type="text/javascript">
                <!--
                document.forms['fromPay'].submit();
                -->
                </script>





                share|improve this answer













                Create a from in your template file with submit URL and also create a block function that return all data that you need to submit.



                Here is the sample code for the same.



                <form action="Submit-URL-HERE" method="POST" name="fromPay">
                <?php foreach ($this->getDataToSubmit() as $name => $value): ?>
                <input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>" />
                <?php endforeach; ?>
                </form>
                <script language="JavaScript" type="text/javascript">
                <!--
                document.forms['fromPay'].submit();
                -->
                </script>






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 21 '17 at 21:20









                Arshad MArshad M

                5201613




                5201613



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f134728%2fhow-to-send-post-data-with-redirect-from-magento-2-for-a-payment-gateway%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form