Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
chore(BUX-175): move adding beef capability into separate function
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Sep 11, 2023
1 parent 6691145 commit 4ffd86f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ func WithPaymailSupport(domains []string, defaultFromPaymail, defaultNote string

// Add generic capabilities
c.paymail.serverConfig.options = append(c.paymail.serverConfig.options, server.WithP2PCapabilities())
c.paymail.serverConfig.options = append(c.paymail.serverConfig.options, server.WithBeefCapabilities())

// Add each domain
for _, domain := range domains {
Expand Down Expand Up @@ -497,6 +496,13 @@ func WithPaymailSupport(domains []string, defaultFromPaymail, defaultNote string
}
}

// WithPaymailBeefSupport will set the configuration for Paymail BEEF format support (as a server)
func WithPaymailBeefSupport() ClientOps {
return func(c *clientOptions) {
c.paymail.serverConfig.options = append(c.paymail.serverConfig.options, server.WithBeefCapabilities())
}
}

// WithPaymailServerConfig will set the custom server configuration for Paymail
//
// This will allow overriding the Configuration.actions (paymail service provider)
Expand Down

0 comments on commit 4ffd86f

Please sign in to comment.