File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2179,9 +2179,11 @@ func (config InvoiceLinkConfig) params() (Params, error) {
2179
2179
params .AddNonZero ("subscription_period" , config .SubscriptionPeriod )
2180
2180
params .AddNonEmpty ("provider_token" , config .ProviderToken )
2181
2181
params .AddNonZero ("max_tip_amount" , config .MaxTipAmount )
2182
- err = params .AddInterface ("suggested_tip_amounts" , config .SuggestedTipAmounts )
2183
- if err != nil {
2184
- return params , err
2182
+ if len (config .SuggestedTipAmounts ) > 0 {
2183
+ err := params .AddInterface ("suggested_tip_amounts" , config .SuggestedTipAmounts )
2184
+ if err != nil {
2185
+ return params , err
2186
+ }
2185
2187
}
2186
2188
params .AddNonEmpty ("provider_data" , config .ProviderData )
2187
2189
params .AddNonEmpty ("photo_url" , config .PhotoURL )
@@ -2196,7 +2198,7 @@ func (config InvoiceLinkConfig) params() (Params, error) {
2196
2198
params .AddBool ("send_email_to_provider" , config .SendEmailToProvider )
2197
2199
params .AddBool ("is_flexible" , config .IsFlexible )
2198
2200
2199
- return params , err
2201
+ return params , nil
2200
2202
}
2201
2203
2202
2204
func (config InvoiceLinkConfig ) method () string {
You can’t perform that action at this time.
0 commit comments