payment gateway for rpn cn
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

30 lignes
522B

  1. package main
  2. import (
  3. "fmt"
  4. "net/http"
  5. )
  6. func StartPay(w http.ResponseWriter, r *http.Request) {
  7. if r.Method != "POST" {
  8. fmt.Fprintf(w, "fuck")
  9. return
  10. }
  11. r.ParseForm()
  12. if !isLeanworkFormValid(r.Form) {
  13. fmt.Fprintf(w, "invalid request")
  14. return
  15. }
  16. for key, value := range r.Form {
  17. fmt.Printf("%s= %s\n", key, value)
  18. fmt.Fprintf(w, "%s= %s\n", key, value)
  19. }
  20. sign := md5LeanworkForm(r.Form)
  21. fmt.Printf("my md5=%s, valid = %t", sign, isLeanworkFormValid(r.Form))
  22. fmt.Fprintf(w, "my md5=%s", sign)
  23. }