Documentation ¶
Index ¶
- func CheckAppAllowOrNot(client *mongo.Client, appID int64, payMethod string) error
- func CheckAppNameExistOrNot(client *mongo.Client, appName string) error
- func CheckOrderExistOrNot(client *mongo.Client, request *helper.Request) error
- func CheckPayMethodExistOrNot(client *mongo.Client, currency, payMethod string) (bool, error)
- func GetAppDetails(request *helper.Request, client *mongo.Client) ([]helper.PayMethodDetail, error)
- func GetBillDetails(request *helper.Request, client *mongo.Client) ([]helper.BillDetail, error)
- func GetExchangeRate(client *mongo.Client, payMethod, currency string) (float64, error)
- func GetPaymentStatus(client *mongo.Client, orderID string) (string, error)
- func InsertApp(client *mongo.Client, appID int64, sign, appName string, methods []string) (*mongo.InsertManyResult, error)
- func InsertDetails(client *mongo.Client, user, payMethod, amount, currency string, appID int64, ...) (string, error)
- func InsertOrderDetails(client *mongo.Client, appID int64, ...) error
- func InsertPayMethod(request *helper.Request, client *mongo.Client) (*mongo.InsertManyResult, error)
- func InsertPaymentDetails(client *mongo.Client, user, payMethod, amount, currency string, appID int64) (string, error)
- func UpdateDBIfDiff(c *gin.Context, orderID string, client *mongo.Client, status, aimStatus string)
- func UpdatePaymentStatus(client *mongo.Client, orderID string, status string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAppAllowOrNot ¶
CheckAppAllowOrNot checks if the appID is allowed to use the payMethod
func CheckAppNameExistOrNot ¶
func CheckOrderExistOrNot ¶
func GetAppDetails ¶
func GetBillDetails ¶
func GetExchangeRate ¶
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 InsertPayMethod ¶
func InsertPaymentDetails ¶
func UpdateDBIfDiff ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.