2016-03-07 07:00:22 +01:00
|
|
|
package paypalsdk_test
|
|
|
|
|
2016-03-07 07:12:38 +01:00
|
|
|
import paypalsdk "github.com/logpacker/PayPal-Go-SDK"
|
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
|
|
|
|
c, err := paypalsdk.NewClient("clientID", "secretID", paypalsdk.APIBaseSandBox)
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|