File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2117,7 +2117,12 @@ func (config InvoiceLinkConfig) params() (Params, error) {
21172117
21182118 params .AddNonEmpty ("provider_token" , config .ProviderToken )
21192119 params .AddNonZero ("max_tip_amount" , config .MaxTipAmount )
2120- err := params .AddInterface ("suggested_tip_amounts" , config .SuggestedTipAmounts )
2120+ if len (config .SuggestedTipAmounts ) > 0 {
2121+ err := params .AddInterface ("suggested_tip_amounts" , config .SuggestedTipAmounts )
2122+ if err != nil {
2123+ return params , err
2124+ }
2125+ }
21212126 params .AddNonEmpty ("provider_data" , config .ProviderData )
21222127 params .AddNonEmpty ("photo_url" , config .PhotoURL )
21232128 params .AddNonZero ("photo_size" , config .PhotoSize )
@@ -2131,7 +2136,7 @@ func (config InvoiceLinkConfig) params() (Params, error) {
21312136 params .AddBool ("send_email_to_provider" , config .SendEmailToProvider )
21322137 params .AddBool ("is_flexible" , config .IsFlexible )
21332138
2134- return params , err
2139+ return params , nil
21352140}
21362141
21372142func (config InvoiceLinkConfig ) method () string {
You can’t perform that action at this time.
0 commit comments