swish

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROD_URL = "https://cpc.getswish.net/swish-cpcapi/api/v2/"
	TEST_URL = "https://mss.cpc.getswish.net/swish-cpcapi/api/v2/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

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

func (*Impl) MakePayment

func (s *Impl) MakePayment(
	ctx context.Context,
	phoneNumber string,
	amountCent int,
	reference string,
	message string,
) error

type MakePaymentRequest

type MakePaymentRequest struct {
	PayeePaymentReference string `json:"payeePaymentReference"`
	CallbackUrl           string `json:"callbackUrl"`
	PayerAlias            string `json:"payerAlias"`
	PayeeAlias            string `json:"payeeAlias"`
	Amount                string `json:"amount"`
	Currency              string `json:"currency"`
	Message               string `json:"message"`
}

type Swish

type Swish interface {
	MakePayment(ctx context.Context, phoneNumber string, amount int, reference string, message string) error
}

func NewSwish

func NewSwish(prod bool, callbackUrl string, clientCert []byte, clientCertPassword string) Swish

Jump to

Keyboard shortcuts

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