package test import ( "fmt" pay_service "hudongzhuanjia/services/pay" "testing" "time" ) func TestUnifiedOrder(t *testing.T) { res, err := pay_service.UnifiedOrder("欧轩互动测试", "o9XM41s_NN8Y0QK6_MbM-aYMV3TE", 200, 0, 1, 101, time.Now().Add(1*time.Hour).Unix()) if err != nil { t.Error(err) } fmt.Println(res) } func TestRefund(t *testing.T) { res, err := pay_service.Refund("测试退款", "qfdyD0vJRHP2xJeoaerSWrGMXDacd5wo") if err != nil { t.Error(err) } fmt.Printf("%+v", res) }