go-paypal is a package written in Go for accessing PayPal APIs using the "NVP" format.
Included is a method for using the Digital Goods for Express Checkout payment option.
import (
"paypal"
"fmt"
)
client := paypal.NewClient(username, password, signature, true)
goods := make([]paypal.PayPalDigitalGood, 1)
good := new(paypal.PayPalDigitalGood)
good.Name, good.Amount, good.Quantity = "Test Good", paymentAmount, 1
goods[0] = *good
response, _ := client.SetExpressCheckoutDigitalGoods(paymentAmount, currencyCode, returnURL, cancelURL, goods)
fmt.Println(response.Values)