models

package
v0.0.0-...-5403f24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AliPayType             = "alipay"
	CaptureMethodAutomatic = "automatic"
	// Invalid cancellation_reason: must be one of duplicate, fraudulent, requested_by_customer, or abandoned
	CanceledReasonRequestedByCustomer = "requested_by_customer"
)

Functions

func AddCustomerPaymentMethod

func AddCustomerPaymentMethod(cus *stripe.Customer, paymentMethodID string) error

func CancelPaymentIntent

func CancelPaymentIntent(secretApiKey, id, cancelReason string) (*stripe.PaymentIntent, error)

func ConfirmPaymentIntent

func ConfirmPaymentIntent(publicApiKey, returnUrl string, pi *stripe.PaymentIntent) (*stripe.PaymentIntent, error)

func CreateCustomer

func CreateCustomer(secretApiKey string, c *Customer) (*stripe.Customer, error)

func CreatePaymentIntent

func CreatePaymentIntent(secretApiKey string, cus *stripe.Customer, amount int64) (*stripe.PaymentIntent, error)

func FindCustomer

func FindCustomer(secretApiKey, email string) (*stripe.Customer, error)

func GetCustomerPaymentMethods

func GetCustomerPaymentMethods(secretApiKey string, cus *stripe.Customer) error

func GetPaymentMethod

func GetPaymentMethod(paymentMethodID string) error

func UpdateCustomer

func UpdateCustomer(secretApiKey, id string, c *Customer) (*stripe.Customer, error)

Types

type Address

type Address struct {
	City       *string `form:"city"`
	Country    *string `form:"country"`
	Line1      *string `form:"line1"`
	Line2      *string `form:"line2"`
	PostalCode *string `form:"postal_code"`
	State      *string `form:"state"`
}

type Customer

type Customer struct {
	Name    *string
	Email   *string
	Address *Address
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL