Skip to content

Override Braintree Config.xml via Custom Module

Below is an except from vendor/paypal/module-braintree-core/etc/config.xml and I am curious how to add new credit card to, <cctypes_braintree_mapper> via a custom module.

Is this done via a di.xml file or a new config.xml file?

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <payment>
            <braintree>
                <model>BraintreeFacade</model>
                <title>Credit Card</title>
                <payment_action>authorize</payment_action>
                <cctypes_braintree_mapper><![CDATA[{"american-express":"AE","discover":"DI","jcb":"JCB","mastercard":"MC","master-card":"MC","visa":"VI","maestro":"MI","uk-maestro":"MI","diners-club":"DN"}]]></cctypes_braintree_mapper>
            </braintree>