func NewPaymentConfirmFailError(msg string) error {
	return &PaymentConfirmFailError{message: msg}
}
NewPaymentConfirmFailError creates an error to use when a payment confirmation fails
package payments
import (
	"context"
	"net/http"
	"github.com/netlify/gocommerce/models"
	"github.com/sirupsen/logrus"
)
const (
	StripeProvider = "stripe"
	PayPalProvider = "paypal"
)
type Provider interface {
	Name() string
	NewCharger(ctx context.Context, r *http.Request, log logrus.FieldLogger) (Charger, error)
	NewRefunder(ctx context.Context, r *http.Request, log logrus.FieldLogger) (Refunder, error)
	NewPreauthorizer(ctx context.Context, r *http.Request, log logrus.FieldLogger) (Preauthorizer, error)
	NewConfirmer(ctx context.Context, r *http.Request, log logrus.FieldLogger) (Confirmer, error)
}
type Charger func(amount uint64, currency string, order *models.Order, invoiceNumber int64) (string, error)
type Refunder func(transactionID string, amount uint64, currency string) (string, error)
type Preauthorizer func(amount uint64, currency string, description string) (*PreauthorizationResult, error)
type PreauthorizationResult struct {
	ID string `json:"id"`
}
type Confirmer func(paymentID string) error
type PaymentPendingError struct {
	metadata map[string]interface{}
}
func NewPaymentPendingError(metadata map[string]interface{}) error {
	return &PaymentPendingError{metadata}
}
func (p *PaymentPendingError) Error() string {
	return "The payment provider requested additional actions on the transaction."
}
func (p *PaymentPendingError) Metadata() map[string]interface{} {
	return p.metadata
}
type PaymentConfirmFailError struct {
	message string
}