Documentation ¶
Index ¶
- Constants
- func Authenticate(r *Request, client *mongo.Client) error
- func InitDBAndColl(client *mongo.Client, datebase string, collection string) *mongo.Collection
- func InitMongoClient(URI string) *mongo.Client
- func RequestLogger() gin.HandlerFunc
- func ResponseLogger() gin.HandlerFunc
- type App
- type BillDetail
- type OrderDetails
- type PayMethodDetail
- type PaymentDetails
- type Request
Constants ¶
View Source
const ( DBURI = "dburi" // TODO the database needs a new name Database = "xy" AppColl = "app" PayMethodColl = "paymethod" PaymentDetailsColl = "paymentdetails" OrderDetailsColl = "orderdetails" )
DB
View Source
const ( Wechat = "wechat" Alipay = "alipay" Stripe = "stripe" )
Paymethod
View Source
const ( Cert = "/path/to/certificates/tls.crt" Key = "/path/to/certificates/tls.key" )
TLS
View Source
const ( DefaultPort string = "443" DefaultDomain string = "cloud.sealos.io" )
stripe
View Source
const ( StripeSuccessPostfix = "STRIPE_SUCCESS_POSTFIX" StripeCancelPostfix = "STRIPE_CANCEL_POSTFIX" StripeCurrency = "STRIPE_CURRENCY" )
View Source
const ( LOCALHOST = "http://localhost:2303" DNS = "https://coqveoktbleo.dev.sealos.top" GROUP = "/v1alpha1/pay" CreatePayMethod = "/method" CreatePayApp = "/app" GetAppDetails = "/details" GetSession = "/session" GetPayStatus = "/status" GetBill = "/bill" TestAppID = 66683568733697785 TestSign = "597d7f10a27219" TestUser = "xy" TestOrderID = "8QC6mu7vSNJckVhpKv" TestSessionID = "cs_test_a1vbMHEx4iVfIWPoiJVVbBd7eecKDw8CDdJoLc7KRpahkMXYJ51EIlA1x5" TestTradeNO = "049dfbf0b96ae9e2fa54a4b8eed6ea34" )
Test
Variables ¶
This section is empty.
Functions ¶
func InitDBAndColl ¶
func InitMongoClient ¶
func RequestLogger ¶
func RequestLogger() gin.HandlerFunc
func ResponseLogger ¶
func ResponseLogger() gin.HandlerFunc
Types ¶
type BillDetail ¶
type OrderDetails ¶
type PayMethodDetail ¶
type PaymentDetails ¶
type Request ¶
type Request struct { AppID int64 `json:"appID"` Sign string `json:"sign"` PayMethod string `json:"payMethod"` Amount string `json:"amount"` User string `json:"user"` PayAppName string `json:"payAppName,omitempty"` Currency string `json:"currency,omitempty"` AmountOptions []string `json:"amountOptions,omitempty"` ExchangeRate float64 `json:"exchangeRate,omitempty"` TaxRate float64 `json:"taxRate,omitempty"` TradeNO string `json:"tradeNO,omitempty"` SessionID string `json:"sessionID,omitempty"` OrderID string `json:"orderID,omitempty"` }
Click to show internal directories.
Click to hide internal directories.