six910btcplugin

package module
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: MIT Imports: 7 Imported by: 2

README

Build Status Quality Gate Status Go Report Card

BTCPay Server Plugin for Six910 E-Commerce solution

A Golang Six910 plugin for BTCPay Server that is mockable

BTCPay Server is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free.

This plugin will be used to add cryptocurrency payments to Six910 E-Commerce System.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BTCPay

type BTCPay struct {
	ClientID   string
	PublicKey  string
	PrivateKey string
	Token      string
	Host       string
	PairingURL string
}

BTCPay BTCPay

type MockBTCPayClient

type MockBTCPayClient struct {
	MockClientID        string
	MockTokenResponse   *cl.TokenResponse
	MockPairingCodeURL  string
	MockRateResponse    *cl.RateResponse
	MockInvoiceResponse *cl.InvoiceResponse
}

MockBTCPayClient MockBTCPayClient

func (*MockBTCPayClient) CreateInvoice

func (a *MockBTCPayClient) CreateInvoice(inv *cl.InvoiceReq) *cl.InvoiceResponse

CreateInvoice CreateInvoice

func (*MockBTCPayClient) GetClientID

func (a *MockBTCPayClient) GetClientID() string

GetClientID GetClientID

func (*MockBTCPayClient) GetInvoice

func (a *MockBTCPayClient) GetInvoice(invoiceID string) *cl.InvoiceResponse

GetInvoice GetInvoice

func (*MockBTCPayClient) GetInvoices

func (a *MockBTCPayClient) GetInvoices(args *cl.InvoiceArgs) *cl.InvoiceListResponse

GetInvoices GetInvoices

func (*MockBTCPayClient) GetPairingCodeRequest

func (a *MockBTCPayClient) GetPairingCodeRequest(code string) string

GetPairingCodeRequest GetPairingCodeRequest

func (*MockBTCPayClient) GetRates

func (a *MockBTCPayClient) GetRates(currencyPairs []string, storeID string) *cl.RateResponse

GetRates GetRates

func (*MockBTCPayClient) New

func (a *MockBTCPayClient) New() cl.Client

New New

func (*MockBTCPayClient) PairClient

func (a *MockBTCPayClient) PairClient(code string) *cl.TokenResponse

PairClient PairClient

func (*MockBTCPayClient) SetLogLevel added in v1.0.1

func (a *MockBTCPayClient) SetLogLevel(level int)

SetLogLevel SetLogLevel

func (*MockBTCPayClient) Token

Token Token

type PayPlugin

type PayPlugin struct {
	Client cl.Client
	// contains filtered or unexported fields
}

PayPlugin PayPlugin

func (*PayPlugin) CreateInvoice

func (p *PayPlugin) CreateInvoice(inv *cl.InvoiceReq) *cl.InvoiceResponse

CreateInvoice CreateInvoice

func (*PayPlugin) GetToken added in v1.0.2

func (p *PayPlugin) GetToken() string

GetToken GetToken

func (*PayPlugin) IsPluginLoaded added in v1.0.2

func (p *PayPlugin) IsPluginLoaded() bool

IsPluginLoaded IsPluginLoaded

func (*PayPlugin) New

func (p *PayPlugin) New() Plugin

New New

func (*PayPlugin) NewClient

func (p *PayPlugin) NewClient(btc *BTCPay) Plugin

NewClient NewClient

func (*PayPlugin) NewPairConnect

func (p *PayPlugin) NewPairConnect(host string) *BTCPay

NewPairConnect NewPairConnect

func (*PayPlugin) SetClient

func (p *PayPlugin) SetClient(c cl.Client)

SetClient SetClient

func (*PayPlugin) SetLogLevel added in v1.0.1

func (p *PayPlugin) SetLogLevel(level int)

SetLogLevel SetLogLevel

type Plugin

type Plugin interface {
	SetClient(c cl.Client)
	NewPairConnect(host string) *BTCPay
	NewClient(btc *BTCPay) Plugin
	CreateInvoice(inv *cl.InvoiceReq) *cl.InvoiceResponse
	SetLogLevel(level int)
	IsPluginLoaded() bool
	GetToken() string
}

Plugin Plugin

Jump to

Keyboard shortcuts

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