forked from braintree-go/braintree-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_values.go
37 lines (31 loc) · 892 Bytes
/
test_values.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
package braintree
import (
"fmt"
"os"
"time"
)
var testCreditCards = map[string]CreditCard{
"visa": CreditCard{Number: "4111111111111111"},
"mastercard": CreditCard{Number: "5555555555554444"},
"discover": CreditCard{Number: "6011111111111117"},
}
var testGateway = New(
Sandbox,
os.Getenv("BRAINTREE_MERCH_ID"),
os.Getenv("BRAINTREE_PUB_KEY"),
os.Getenv("BRAINTREE_PRIV_KEY"),
)
var testTimeZone = func() *time.Location {
tzName := os.Getenv("BRAINTREE_TIMEZONE")
if tzName == "" {
return time.UTC
}
tz, err := time.LoadLocation(tzName)
if err != nil {
panic(fmt.Errorf("Error loading time zone location %s: %s", tzName, err))
}
return tz
}()
var testMerchantAccountId = os.Getenv("BRAINTREE_MERCH_ACCT_ID")
// Merchant Account which has AVS and CVV checking turned on.
var avsAndCVVTestMerchantAccountId = os.Getenv("BRAINTREE_MERCH_ACCT_ID_FOR_AVS_CVV")