diff --git a/card.go b/card.go index 00a5b8ac96..8267111299 100644 --- a/card.go +++ b/card.go @@ -68,17 +68,16 @@ type CardParams struct { // because the cards endpoint is a little unusual. There is one other resource // like it, which is bank account. func (c *CardParams) AppendToAsCardSourceOrExternalAccount(body *form.Values, keyParts []string) { - if len(c.Token) > 0 && len(c.Account) > 0 { - body.Add(form.FormatKey(append(keyParts, "external_account")), c.Token) - - } - if c.Default { body.Add(form.FormatKey(append(keyParts, "default_for_currency")), strconv.FormatBool(c.Default)) } if len(c.Token) > 0 { - body.Add(form.FormatKey(append(keyParts, cardSource)), c.Token) + if len(c.Account) > 0 { + body.Add(form.FormatKey(append(keyParts, "external_account")), c.Token) + } else { + body.Add(form.FormatKey(append(keyParts, cardSource)), c.Token) + } } if len(c.Number) > 0 {