amount := int64(1299)
currency := "USD"
country := "US"
paymentServiceId := "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
achPaymentMethod := components.ACHBankPaymentMethodCreate{
AccountNumber: "1234567890",
RoutingNumber: "011000138",
AccountType: components.AccountTypeChecking,
AccountHolder: components.BankAccountHolder{
FirstName: gr4vy.String("John"),
LastName: gr4vy.String("Doe"),
},
}
paymentMethod := components.CreateTransactionCreatePaymentMethodACHBankPaymentMethodCreate(achPaymentMethod)
transactionCreate := components.TransactionCreate{
Amount: amount,
Currency: currency,
Country: &country,
Intent: gr4vy.Pointer(components.TransactionIntentCapture),
PaymentMethod: &paymentMethod,
Buyer: &components.GuestBuyer{
BillingDetails: &components.BillingDetails{
FirstName: gr4vy.String("John"),
LastName: gr4vy.String("Doe"),
},
},
PaymentServiceID: &paymentServiceId,
}
transaction, err := client.Transactions.Create(ctx, transactionCreate, nil, nil, nil)