diff --git a/params.go b/params.go index f13d7b04fb..55aade42c1 100644 --- a/params.go +++ b/params.go @@ -189,10 +189,10 @@ type Params struct { // Headers may be used to provide extra header lines on the HTTP request. Headers http.Header `form:"-"` - IdempotencyKey *string `form:"-"` // Passed as header + IdempotencyKey *string `form:"-"` // Passed as header // Deprecated: Please use Metadata in the containing struct instead. - Metadata map[string]string `form:"metadata"` + Metadata map[string]string `form:"metadata"` // StripeAccount may contain the ID of a connected account. By including // this field, the request is made as if it originated from the connected diff --git a/stripe.go b/stripe.go index 56c1da6533..d4c6dc27f2 100644 --- a/stripe.go +++ b/stripe.go @@ -293,7 +293,7 @@ func extractParams(params ParamsContainer) (*form.Values, *Params, error) { if reflectValue.Kind() == reflect.Ptr && !reflectValue.IsNil() { commonParams = params.GetParams() - if reflectValue.Elem().FieldByName("Metadata").IsZero() { + if !reflectValue.Elem().FieldByName("Metadata").IsZero() { if commonParams.Metadata != nil { return nil, nil, fmt.Errorf("You cannot specify both the (deprecated) .Params.Metadata and .Metadata in %s", reflectValue.Elem().Type().Name()) }