package main
import(
"context"
"os"
gr4vygo "github.com/gr4vy/gr4vy-go"
"github.com/gr4vy/gr4vy-go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := gr4vy.New(
gr4vy.WithID("example"),
gr4vy.WithServer(gr4vy.ServerSandbox),
gr4vy.WithSecuritySource(withToken),
gr4vy.WithMerchantAccountID("default"),
)
res, err := s.DigitalWallets.Sessions.PazeMobileSessionComplete(ctx, components.PazeSessionCompleteRequest{
SessionID: "7c1cba03-d20e-4a3f-9d77-e5dc23a39ac2",
Code: "eyJhdWQiOm51bGwsImtpZCI6IjE3...",
AccessToken: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
TransactionType: components.PazeSessionCompleteRequestTransactiontypePurchase,
}, nil)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}