bitpay

package
v1.37.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package bitpay implements the BitPay payment processor for Commerce. Uses the BitPay REST API v2 directly (no SDK dependency).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIToken    string
	Environment string // "test" or "prod"
}

Config holds BitPay API credentials.

type Provider

type Provider struct {
	*processor.BaseProcessor
	// contains filtered or unexported fields
}

Provider implements processor.PaymentProcessor for BitPay API v2.

func NewProvider

func NewProvider(cfg Config) *Provider

NewProvider creates a configured BitPay provider instance.

func (*Provider) Charge

Charge creates a BitPay invoice.

func (*Provider) GetTransaction

func (p *Provider) GetTransaction(ctx context.Context, txID string) (*processor.Transaction, error)

GetTransaction retrieves a BitPay invoice by ID.

func (*Provider) IsAvailable

func (p *Provider) IsAvailable(ctx context.Context) bool

IsAvailable reports whether the processor is configured.

func (*Provider) Refund

Refund creates a BitPay refund request.

func (*Provider) SupportedCurrencies

func (p *Provider) SupportedCurrencies() []currency.Type

SupportedCurrencies returns currencies this processor supports.

func (*Provider) Type

func (p *Provider) Type() processor.ProcessorType

Type returns the processor type.

func (*Provider) ValidateWebhook

func (p *Provider) ValidateWebhook(ctx context.Context, payload []byte, signature string) (*processor.WebhookEvent, error)

ValidateWebhook verifies a BitPay webhook signature (HMAC-SHA256 with API token).

Jump to

Keyboard shortcuts

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