-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaymentHandlers.go
38 lines (27 loc) · 1.06 KB
/
paymentHandlers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import (
"net/http"
"github.com/vennd/enu/internal/golang.org/x/net/context"
"github.com/vennd/enu/consts"
"github.com/vennd/enu/enulib"
)
func PaymentCreate(c context.Context, w http.ResponseWriter, r *http.Request) *enulib.AppError {
// Add to the context the RequestType
c = context.WithValue(c, consts.RequestTypeKey, "simplepayment")
return handle(c, w, r)
}
func PaymentRetry(c context.Context, w http.ResponseWriter, r *http.Request) *enulib.AppError {
// Add to the context the RequestType
c = context.WithValue(c, consts.RequestTypeKey, "paymentretry")
return handle(c, w, r)
}
func GetPayment(c context.Context, w http.ResponseWriter, r *http.Request) *enulib.AppError {
// Add to the context the RequestType
c = context.WithValue(c, consts.RequestTypeKey, "getpayment")
return handle(c, w, r)
}
func GetPaymentsByAddress(c context.Context, w http.ResponseWriter, r *http.Request) *enulib.AppError {
// Add to the context the RequestType
c = context.WithValue(c, consts.RequestTypeKey, "paymentbyaddress")
return handle(c, w, r)
}