互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
512 B

5 years ago
5 years ago
  1. package test
  2. import (
  3. "fmt"
  4. pay_service "hudongzhuanjia/services/pay"
  5. "testing"
  6. "time"
  7. )
  8. func TestUnifiedOrder(t *testing.T) {
  9. res, err := pay_service.UnifiedOrder("欧轩互动测试", "o9XM41s_NN8Y0QK6_MbM-aYMV3TE",
  10. 200, 0, 1, 101, time.Now().Add(1*time.Hour).Unix())
  11. if err != nil {
  12. t.Error(err)
  13. }
  14. fmt.Println(res)
  15. }
  16. func TestRefund(t *testing.T) {
  17. res, err := pay_service.Refund("测试退款", "qfdyD0vJRHP2xJeoaerSWrGMXDacd5wo")
  18. if err != nil {
  19. t.Error(err)
  20. }
  21. fmt.Printf("%+v", res)
  22. }