paypal

package
v0.0.0-...-45c4399 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type Logger

type Logger interface {
	Errorf(format string, args ...interface{})
	Debugf(format string, args ...interface{})
}

type Payment

type Payment struct {
	Amount string    `json:"amount"`
	Time   time.Time `json:"time"`
}

type Paypal

type Paypal struct {
	// contains filtered or unexported fields
}

func Setup

func Setup(url string, clientID string, clientSecret string, logger Logger) Paypal

func (Paypal) GetSubscriber

func (p Paypal) GetSubscriber(subscriptionID string) (name string, email string, err error)

func (Paypal) GetSubscription

func (p Paypal) GetSubscription(subscriptionID string) (status string, lastPaymentAmount string, lastPaymentTime time.Time, err error)

type Subscriber

type Subscriber struct {
	ID        string `json:"id"`
	Summary   string `json:"summary"`
	EventType string `json:"event_type"`
	Name      struct {
		GivenName string `json:"given_name"`
		SurName   string `json:"surname"`
	} `json:"name"`
	Email string `json:"email_address"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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