Documentation ¶
Index ¶
- type Card
- func (c *Card) CancelSubscription(subID string) error
- func (c *Card) Charge(currency string, amount int) (*stripe.PaymentIntent, string, error)
- func (c *Card) CreateCustomer(pm, email string) (*stripe.Customer, string, error)
- func (c *Card) CreatePaymentIntent(currency string, amount int) (*stripe.PaymentIntent, string, error)
- func (c *Card) GetPaymentMethod(s string) (*stripe.PaymentMethod, error)
- func (c *Card) Refund(pi string, amount int) error
- func (c *Card) RetrievePaymentIntent(id string) (*stripe.PaymentIntent, error)
- func (c *Card) SubscribeToPlan(cust *stripe.Customer, plan, email, last4, cardType string) (*stripe.Subscription, error)
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Card ¶
Card holds the information needed by this package
func (*Card) CancelSubscription ¶
CancelSubscription cancels a subscription, by subscription id
func (*Card) CreateCustomer ¶
CreateCustomer creates a stripe customer
func (*Card) CreatePaymentIntent ¶
func (c *Card) CreatePaymentIntent(currency string, amount int) (*stripe.PaymentIntent, string, error)
CreatePaymentIntent attempts to get a payment intent object from Stripe
func (*Card) GetPaymentMethod ¶
GetPaymentMethod gets the payment method by payment intend id
func (*Card) RetrievePaymentIntent ¶
RetrievePaymentIntent gets an existing payment intent by id
func (*Card) SubscribeToPlan ¶
func (c *Card) SubscribeToPlan(cust *stripe.Customer, plan, email, last4, cardType string) (*stripe.Subscription, error)
SubscribeToPlan subscribes a stripe customer to a stripe plan
Click to show internal directories.
Click to hide internal directories.