-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.go
46 lines (39 loc) · 960 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package ogone
// Config keep ogone service configuration parameters
type Config struct {
pspID string
userID string
password string
sign string
sandbox bool
}
// NewConfig create new Config configuration for ogone endpoint
func NewConfig(pspID, userID, password, sign string, sandbox bool) *Config {
return &Config{
pspID: pspID,
userID: userID,
password: password,
sign: sign,
sandbox: sandbox,
}
}
// GetPspID return pspID configuration
func (c *Config) GetPspID() string {
return c.pspID
}
// GetUserID return userID configuration
func (c *Config) GetUserID() string {
return c.userID
}
// GetPassword return password configuration
func (c *Config) GetPassword() string {
return c.password
}
// GetSign return sign configuration
func (c *Config) GetSign() string {
return c.sign
}
// IsSandbox true if endpoint must call sandbox instead of live gateway
func (c *Config) IsSandbox() bool {
return c.sandbox
}