cards

package
v0.0.0-...-644ee68 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 5 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) Charge

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

func (*Card) CreateCustomer

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

func (*Card) CreatePaymentIntent

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

func (*Card) GetPaymentMethod

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

GetPaymentMethod retrieves the payment intent by payment id

func (*Card) RetrivePaymentIntent

func (card *Card) RetrivePaymentIntent(id string) (*stripe.PaymentIntent, error)

RetrivePaymentIntent gets existing payment intent

func (*Card) SubscribeToPlan

func (card *Card) SubscribeToPlan(customer *stripe.Customer, plan, email, last4, cardType string) (*stripe.Subscription, error)

type Status

type Status int

type Transaction

type Transaction struct {
	TransactionStatusID Status
	Amount              int
	LastFour            string
	Currency            string
	BankReturnCode      string
}

Jump to

Keyboard shortcuts

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