0

In the etc/config.xml I can use some variables, like {{base_url}}, but I need to use other urls in this config.

How I can create custom variables to use in the etc/config.xml file?

Example:

In my config.xml I have this:

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <payment>
        <pagseguro>
            <application_authorization_redirect>{{base_url}}pagseguro/application/authorization</application_authorization_redirect>
            <after_authorization_redirect>http://frontendapp.com/pagseguro</after_authorization_redirect>
        </pagseguro>
    <payment>
</config>

In the "application_authorization_redirect" I used the variable {{base_url}} but in the "after_authorization_redirect" I hardcoded the url, but I what to use here a dynamic url too. Something like:

<after_authorization_redirect>{{frontendapp_url}}pagseguro</after_authorization_redirect>
  • Actually, your question is not clear to me. Could you give an example? – Khoa TruongDinh Dec 7 '18 at 3:40
  • @KhoaTruongDinh Thanks for the reply. I edited my post with an example. – Douglas Ianitsky Dec 13 '18 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.