Documentation ¶
Index ¶
- func Encrypt3Des(key string, payload []byte) (string, error)
- func EnrichRequest(req *http.Request, headers map[string]string) *http.Request
- func EnrichRequestWithAuth(req *http.Request, token string, headers map[string]string) *http.Request
- func GenerateRef(referencePrefix string) string
- func MapToJson(data interface{}) ([]byte, error)
- func Pkcs5Padding(ciphertext []byte, blockSize int) []byte
- func VerifyChargeResponse(chargeResponse string) error
- func VerifyChargedAmount(apiChargedAmount, chargedAmount float64) error
- func VerifyCurrencyCode(apiCurrencyCode, currencyCode interface{}) error
- func VerifySuccessMessage(status string) error
- func VerifyTransactionReference(apiTransactionRef, transactionRef interface{}) error
- type DefaultFlutterHttpClient
- func (d DefaultFlutterHttpClient) Delete(ctx context.Context, endpoint string, token string, body []byte, ...) (*http.Response, error)
- func (d DefaultFlutterHttpClient) Get(ctx context.Context, endpoint string, token string, headers map[string]string) (*http.Response, error)
- func (d DefaultFlutterHttpClient) Options(ctx context.Context, endpoint string, token string, headers map[string]string) (*http.Response, error)
- func (d DefaultFlutterHttpClient) Post(ctx context.Context, endpoint string, token string, body []byte, ...) (*http.Response, error)
- func (d DefaultFlutterHttpClient) Put(ctx context.Context, endpoint string, token string, body []byte, ...) (*http.Response, error)
- type FlutterHttpClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnrichRequestWithAuth ¶
func GenerateRef ¶
GenerateRef Generate transaction reference
func Pkcs5Padding ¶
func VerifyChargeResponse ¶
func VerifyChargedAmount ¶
VerifyChargedAmount The Charged Amount must be greater than or equal to the paid amount
func VerifyCurrencyCode ¶
func VerifyCurrencyCode(apiCurrencyCode, currencyCode interface{}) error
VerifyCurrencyCode The Currency code must match
func VerifySuccessMessage ¶
VerifySuccessMessage The status should equal "success" for a successful transaction
func VerifyTransactionReference ¶
func VerifyTransactionReference(apiTransactionRef, transactionRef interface{}) error
VerifyTransactionReference Checks that the transaction reference(TxRef) match
Types ¶
type DefaultFlutterHttpClient ¶
type DefaultFlutterHttpClient struct{}
type FlutterHttpClient ¶
type FlutterHttpClient interface { Get(ctx context.Context, endpoint string, token string, headers map[string]string) (*http.Response, error) Options(ctx context.Context, endpoint string, token string, headers map[string]string) (*http.Response, error) Post(ctx context.Context, endpoint string, token string, body []byte, headers map[string]string) (*http.Response, error) Delete(ctx context.Context, endpoint string, token string, body []byte, headers map[string]string) (*http.Response, error) Put(ctx context.Context, endpoint string, token string, body []byte, headers map[string]string) (*http.Response, error) }
Click to show internal directories.
Click to hide internal directories.