Documentation ¶
Index ¶
- func CreateOrder(order CreatePaymentOrder) string
- func Decode(kp string) (map[string]interface{}, error)
- func DecodeAPI(API string) (map[string]interface{}, error)
- func KarmaPayWebhook(action func(data map[string]string) error) func(c *fiber.Ctx) error
- func PushOrderToRedis(Order RedisOrder)
- func TriggerWebhook(url string) error
- func VerifyPaymentAPI() func(c *fiber.Ctx) error
- type CreatePaymentOrder
- type Order
- type RedisOrder
- type ResponseHTTP
- type VerifyPaymentRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrder ¶
func CreateOrder(order CreatePaymentOrder) string
func KarmaPayWebhook ¶ added in v1.1.3
func PushOrderToRedis ¶
func PushOrderToRedis(Order RedisOrder)
func TriggerWebhook ¶
func VerifyPaymentAPI ¶
func VerifyPaymentAPI() func(c *fiber.Ctx) error
Types ¶
type CreatePaymentOrder ¶
type CreatePaymentOrder struct { OrderAmount int32 `json:"order_amt"` OrderCurrency string `json:"order_currency"` OrderDescription string `json:"order_description"` OrderMode string `json:"order_mode"` RedirectURL string `json:"redirect_url"` WebhookURL string `json:"webhook_url"` Registration string `json:"registration"` }
type Order ¶
type Order struct { UID string `json:"uid"` OrderID string `json:"order_id"` OrderAmount string `json:"order_amount"` OrderStatus string `json:"order_status"` OrderCID string `json:"order_cid"` OrderCurrency string `json:"order_currency"` OrderDescription string `json:"order_description"` OrderTimeStamp string `json:"order_timestamp"` OrderUpiTransactionID string `json:"order_upi_transaction_id"` }
type RedisOrder ¶
type RedisOrder struct { OrderID string `json:"order_id"` OrderStatus string `json:"order_status"` UID string `json:"uid"` Email string `json:"email"` KPAPI string `json:"kpapi"` API_KEY string `json:"api_key"` OrderAmount string `json:"order_amt"` OrderCurrency string `json:"order_currency"` OrderDescription string `json:"order_description"` Subdomain string `json:"subdomain"` OrderMode string `json:"order_mode"` WebhookURL string `json:"webhook_url"` RedirectURL string `json:"redirect_url"` VerifyURL string `json:"verify_url"` Registration string `json:"registration"` OrderCID string `json:"order_cid"` PGOrder json.RawMessage `json:"PGOrder"` Timestamp string `json:"timestamp"` }
func GetOrderFromRedis ¶
func GetOrderFromRedis(OrderID string) (RedisOrder, error)
type ResponseHTTP ¶
Click to show internal directories.
Click to hide internal directories.