paypal/example_test.go

18 lines
297 B
Go
Raw Normal View History

2019-08-21 15:50:20 +02:00
package paypal_test
2016-03-07 07:00:22 +01:00
import "github.com/plutov/paypal/v3"
2016-03-07 07:00:22 +01:00
2016-03-07 07:12:38 +01:00
func Example() {
2016-03-07 07:00:22 +01:00
// Initialize client
2019-08-21 15:50:20 +02:00
c, err := paypal.NewClient("clientID", "secretID", paypal.APIBaseSandBox)
2016-03-07 07:00:22 +01:00
if err != nil {
panic(err)
}
2016-12-22 06:12:47 +01:00
// Retrieve access token
2016-03-07 07:00:22 +01:00
_, err = c.GetAccessToken()
if err != nil {
panic(err)
}
}