-
Notifications
You must be signed in to change notification settings - Fork 427
/
face_certify_test.go
46 lines (37 loc) · 993 Bytes
/
face_certify_test.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
39
40
41
42
43
44
45
46
package alipay_test
import (
"context"
"github.com/smartwalle/alipay/v3"
"testing"
)
func TestClient_FaceVerificationInitialize(t *testing.T) {
t.Log("========== FaceVerificationInitialize ==========")
var p = alipay.FaceVerificationInitialize{}
p.OuterOrderNo = "xxxxxx"
p.BizCode = "DATA_DIGITAL_BIZ_CODE_FACE_VERIFICATION"
p.IdentityType = "CERT_INFO"
p.CertType = "IDENTITY_CARD"
p.CertName = "张三"
p.CertNo = "131128199004234511"
rsp, err := client.FaceVerificationInitialize(context.Background(), p)
if err != nil {
t.Fatal(err)
}
if rsp.IsFailure() {
t.Fatal(rsp.Msg, rsp.SubMsg)
}
t.Logf("%v", rsp)
}
func TestClient_FaceVerificationQuery(t *testing.T) {
t.Log("========== FaceVerificationQuery ==========")
var p = alipay.FaceVerificationQuery{}
p.CertifyId = "xxxxxx"
rsp, err := client.FaceVerificationQuery(context.Background(), p)
if err != nil {
t.Fatal(err)
}
if rsp.IsFailure() {
t.Fatal(rsp.Msg, rsp.SubMsg)
}
t.Logf("%v", rsp)
}