I am using brain-tree as payment gateway. In that i am using drop-in UI.
in drop-in ui there is a option change payment method.
When i do the change payment method, its getting changed but its not getting to set default. And for next transaction its taking old card only not newly added card.

my js

```
<script>
$(document).ready(function() {
    braintree.setup("{{ client_token }}", "dropin", {
        container: "checkout",
        form: "checkoutForm"
    });

    $("#submitPayment").on("click", function () {

        $("button").off("click");
        $("a").off("click");
        $('body').off("click");

        var btn = $(this).button("loading")
        setTimeout(function () {
            btn.button('reset');
        }, 3500)
    });
});
</script>

```

form.html

```
<form id='checkoutForm' method='POST' action="/upgrade/">{% csrf_token %}

            <div id='checkout' ></div>

                <input type="hidden" name="plan" value="{{ plan }}"/>
                <input name="token" type="hidden" value="{{ client_token }}" />
                <!-- disable this when clicked -->
            <button type="button" class="btn modal-action modal-close right margin-class canceleledd"
                            style="display:none;background-color:lightcoral;color: #000000;">Cancel</button>
            <input id='submitPayment' type='submit' data-loading-text="Completing..." class='btn right margin-class' value='Pay ${{ amount }}' autocomplete="off" style="background-color:lightblue;color: #000000;"/>
</form>

```

i am not getting how to set the payment method to default when added new card.
Help will be appreciated. Thank you.