cards

package
v0.0.0-...-07c4852 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Secret   string
	Key      string
	Currency string
}

func (*Card) CancelSubscription

func (c *Card) CancelSubscription(subID string) error

func (Card) Charge

func (c Card) Charge(currency string, amount int) (*stripe.PaymentIntent, string, error)

func (*Card) CreateCustomer

func (c *Card) CreateCustomer(pm, email string) (*stripe.Customer, string, error)

func (*Card) CreatePaymentIntent

func (c *Card) CreatePaymentIntent(currency string, amount int) (*stripe.PaymentIntent, string, error)

func (*Card) GetPaymentMethod

func (c *Card) GetPaymentMethod(s string) (*stripe.PaymentMethod, error)

GetPaymentMethod gets the payment method by payment intent ID

func (*Card) Refund

func (c *Card) Refund(pi string, amount int) error

func (*Card) RetrievePaymentIntent

func (c *Card) RetrievePaymentIntent(id string) (*stripe.PaymentIntent, error)

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

type Transaction

type Transaction struct {
	TransactionStatus int
	Amount            int
	Currency          string
	LastFour          string
	BankReturnCode    string
}

Jump to

Keyboard shortcuts

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