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) {
2117
2117
2118
2118
params .AddNonEmpty ("provider_token" , config .ProviderToken )
2119
2119
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
+ }
2121
2126
params .AddNonEmpty ("provider_data" , config .ProviderData )
2122
2127
params .AddNonEmpty ("photo_url" , config .PhotoURL )
2123
2128
params .AddNonZero ("photo_size" , config .PhotoSize )
@@ -2131,7 +2136,7 @@ func (config InvoiceLinkConfig) params() (Params, error) {
2131
2136
params .AddBool ("send_email_to_provider" , config .SendEmailToProvider )
2132
2137
params .AddBool ("is_flexible" , config .IsFlexible )
2133
2138
2134
- return params , err
2139
+ return params , nil
2135
2140
}
2136
2141
2137
2142
func (config InvoiceLinkConfig ) method () string {
You can’t perform that action at this time.
0 commit comments