Documentation ¶
Index ¶
- type APIKey
- type Client
- type InitializePayment
- func (rcv *InitializePayment) AddMeta(key string, value interface{}) *InitializePayment
- func (rcv *InitializePayment) SetAbortURL(abortURL *url.URL) *InitializePayment
- func (rcv *InitializePayment) SetLanguage(language string) *InitializePayment
- func (rcv *InitializePayment) SetSuccessURL(successURL *url.URL) *InitializePayment
- func (rcv *InitializePayment) SetWebhookURL(webhookURL *url.URL) *InitializePayment
- func (rcv *InitializePayment) Valid() error
- type Recipient
- type Sender
- type SignatureVerifier
- type Transaction
- func (rcv *Transaction) AbortURL() *url.URL
- func (rcv *Transaction) Amount() float64
- func (rcv *Transaction) CurrencyID() string
- func (rcv *Transaction) IsTestMode() bool
- func (rcv *Transaction) Language() string
- func (rcv *Transaction) Metadata() map[string]interface{}
- func (rcv *Transaction) PayFormCode() string
- func (rcv *Transaction) Purpose() string
- func (rcv *Transaction) Recipient() *Recipient
- func (rcv *Transaction) Sender() *Sender
- func (rcv *Transaction) Status() string
- func (rcv *Transaction) SuccessURL() *url.URL
- func (rcv *Transaction) UUID() *uuid.UUID
- func (rcv *Transaction) WebhookURL() *url.URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { InitializePayment(ctx context.Context, p *InitializePayment) (*Transaction, error) GetPayment(ctx context.Context, uuid uuid.UUID) (*Transaction, error) DeletePayment(ctx context.Context, uuid uuid.UUID) error }
Please note that sofortpay is a Payment Initiation Service, which means that your client can initiate a payment with their bank account via this payment method.
https://manage.sofort-pay.com/merchant/documentation/payments/api/payment
type InitializePayment ¶
type InitializePayment struct {
// contains filtered or unexported fields
}
func NewInitializePayment ¶
func NewInitializePayment(currencyID string, amount float64, referenceTransactionID string) *InitializePayment
func (*InitializePayment) AddMeta ¶
func (rcv *InitializePayment) AddMeta(key string, value interface{}) *InitializePayment
An object of data which will be passed back to your application
func (*InitializePayment) SetAbortURL ¶
func (rcv *InitializePayment) SetAbortURL(abortURL *url.URL) *InitializePayment
Set return URL if a transaction was aborted
func (*InitializePayment) SetLanguage ¶
func (rcv *InitializePayment) SetLanguage(language string) *InitializePayment
Set the language our payment form initially will be shown to the user
func (*InitializePayment) SetSuccessURL ¶
func (rcv *InitializePayment) SetSuccessURL(successURL *url.URL) *InitializePayment
Set return URL if a transaction was successful
func (*InitializePayment) SetWebhookURL ¶
func (rcv *InitializePayment) SetWebhookURL(webhookURL *url.URL) *InitializePayment
Set URL to notify an endpoint about transaction events. Please use only HTTPS for production mode.
func (*InitializePayment) Valid ¶
func (rcv *InitializePayment) Valid() error
type Recipient ¶
type Recipient struct {
// contains filtered or unexported fields
}
Recipient
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Object holding information about a sender account
type SignatureVerifier ¶
To ensure the authenticity and integrity of the payload of a webhook, we sign the payload with a shared secret. The signature is transmitted in a header with our request and is named X-Payload-Signature. The header has the following structure: X-Payload-Signature: v1=<v1_signature_hash>;
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) AbortURL ¶
func (rcv *Transaction) AbortURL() *url.URL
Return URL if a transaction was aborted
func (*Transaction) CurrencyID ¶
func (rcv *Transaction) CurrencyID() string
The currency of your payment (ISO 4217)
func (*Transaction) Language ¶
func (rcv *Transaction) Language() string
The language our payment form initially will be shown to the user (ISO 639-1)
func (*Transaction) Metadata ¶
func (rcv *Transaction) Metadata() map[string]interface{}
An object of data which will be passed back to your application
func (*Transaction) PayFormCode ¶
func (rcv *Transaction) PayFormCode() string
Code to specify which customized Payform template should be used.
func (*Transaction) Purpose ¶
func (rcv *Transaction) Purpose() string
The purpose (aka subject) of your payment
func (*Transaction) Sender ¶
func (rcv *Transaction) Sender() *Sender
Object holding information about a sender account
func (*Transaction) SuccessURL ¶
func (rcv *Transaction) SuccessURL() *url.URL
Return URL if a transaction was successful
func (*Transaction) WebhookURL ¶
func (rcv *Transaction) WebhookURL() *url.URL
URL to notify an endpoint about transaction events. Please use only HTTPS for production mode.