Documentation
¶
Overview ¶
Package bitpay implements the BitPay payment processor for Commerce. Uses the BitPay REST API v2 directly (no SDK dependency).
Index ¶
- type Config
- type Provider
- func (p *Provider) Charge(ctx context.Context, req processor.PaymentRequest) (*processor.PaymentResult, error)
- func (p *Provider) GetTransaction(ctx context.Context, txID string) (*processor.Transaction, error)
- func (p *Provider) IsAvailable(ctx context.Context) bool
- func (p *Provider) Refund(ctx context.Context, req processor.RefundRequest) (*processor.RefundResult, error)
- func (p *Provider) SupportedCurrencies() []currency.Type
- func (p *Provider) Type() processor.ProcessorType
- func (p *Provider) ValidateWebhook(ctx context.Context, payload []byte, signature string) (*processor.WebhookEvent, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
*processor.BaseProcessor
// contains filtered or unexported fields
}
Provider implements processor.PaymentProcessor for BitPay API v2.
func NewProvider ¶
NewProvider creates a configured BitPay provider instance.
func (*Provider) Charge ¶
func (p *Provider) Charge(ctx context.Context, req processor.PaymentRequest) (*processor.PaymentResult, error)
Charge creates a BitPay invoice.
func (*Provider) GetTransaction ¶
GetTransaction retrieves a BitPay invoice by ID.
func (*Provider) IsAvailable ¶
IsAvailable reports whether the processor is configured.
func (*Provider) Refund ¶
func (p *Provider) Refund(ctx context.Context, req processor.RefundRequest) (*processor.RefundResult, error)
Refund creates a BitPay refund request.
func (*Provider) SupportedCurrencies ¶
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).
Click to show internal directories.
Click to hide internal directories.