Просмотр исходного кода

using pretty template

tags/v0.5
patrick 5 лет назад
Родитель
Сommit
3dbb984bcb
1 измененных файлов: 7 добавлений и 3 удалений
  1. +7
    -3
      purchase.go

+ 7
- 3
purchase.go Просмотреть файл

import ( import (
"fmt" "fmt"
"net/http" "net/http"
"text/template"
) )


func StartPay(w http.ResponseWriter, r *http.Request) { func StartPay(w http.ResponseWriter, r *http.Request) {
} }


func askForPaymentSelection(w http.ResponseWriter, row LeanworkRequest) { func askForPaymentSelection(w http.ResponseWriter, row LeanworkRequest) {

tmpl.ExecuteTemplate(w, "StartPay", row)
t := template.Must(template.ParseFiles("PG/index.html"))
//tmpl.ExecuteTemplate(w, "StartPay", row)
t.Execute(w, row)
} }


func askForPaymentInfo(w http.ResponseWriter, row LeanworkRequest, rpn_type string) { func askForPaymentInfo(w http.ResponseWriter, row LeanworkRequest, rpn_type string) {
data.Id = row.Id data.Id = row.Id
data.Sign = row.Sign data.Sign = row.Sign
data.RpnType = rpn_type data.RpnType = rpn_type
tmpl.ExecuteTemplate(w, "rpnAskNameAndCard", data)
//tmpl.ExecuteTemplate(w, "rpnAskNameAndCard", data)
t := template.Must(template.ParseFiles("PG/rpnAskNameAndCard.html"))
t.Execute(w, data)
} }


func choosePayment(w http.ResponseWriter, r *http.Request) { func choosePayment(w http.ResponseWriter, r *http.Request) {

Загрузка…
Отмена
Сохранить