handler

package
v0.0.0-...-90e5c28 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAppAllowOrNot

func CheckAppAllowOrNot(client *mongo.Client, appID int64, payMethod string) error

CheckAppAllowOrNot checks if the appID is allowed to use the payMethod

func CheckAppNameExistOrNot

func CheckAppNameExistOrNot(client *mongo.Client, appName string) error

func CheckOrderExistOrNot

func CheckOrderExistOrNot(client *mongo.Client, request *helper.Request) error

func CheckPayMethodExistOrNot

func CheckPayMethodExistOrNot(client *mongo.Client, currency, payMethod string) (bool, error)

func GetAppDetails

func GetAppDetails(request *helper.Request, client *mongo.Client) ([]helper.PayMethodDetail, error)

func GetBillDetails

func GetBillDetails(request *helper.Request, client *mongo.Client) ([]helper.BillDetail, error)

func GetExchangeRate

func GetExchangeRate(client *mongo.Client, payMethod, currency string) (float64, error)

func GetPaymentStatus

func GetPaymentStatus(client *mongo.Client, orderID string) (string, error)

func InsertApp

func InsertApp(client *mongo.Client, appID int64, sign, appName string, methods []string) (*mongo.InsertManyResult, error)

func InsertDetails

func InsertDetails(client *mongo.Client, user, payMethod, amount, currency string, appID int64, details map[string]interface{}) (string, error)

InsertDetails inserts data into both the payment_details and order_details tables and ensures transactionality

func InsertOrderDetails

func InsertOrderDetails(client *mongo.Client, appID int64, user, orderID, amount, payMethod, currency string, details map[string]interface{}) error

func InsertPayMethod

func InsertPayMethod(request *helper.Request, client *mongo.Client) (*mongo.InsertManyResult, error)

func InsertPaymentDetails

func InsertPaymentDetails(client *mongo.Client, user, payMethod, amount, currency string, appID int64) (string, error)

func UpdateDBIfDiff

func UpdateDBIfDiff(c *gin.Context, orderID string, client *mongo.Client, status, aimStatus string)

func UpdatePaymentStatus

func UpdatePaymentStatus(client *mongo.Client, orderID string, status string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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