doum
3 天以前 c5c4f201eedfcf374008238dce7afc84f8200ea4
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
47
package com.allinpay.syb.test;
 
import java.util.Map;
 
import com.allinpay.syb.lib.SybPayService;
import com.allinpay.syb.lib.SybUtil;
 
 
public class ApiTestV2 {
    public static void main(String[] args) throws Exception{
        testCancel();
        //testRefund();
//        testQuery();
    }
    
    public static void testQuery() throws Exception{
        SybPayService service = new SybPayService();
        Map<String, String> map = service.query("", "112094120001239205");
        print(map);
    }
    
    public static void testRefund() throws Exception{
        SybPayService service = new SybPayService();
        String reqsn = String.valueOf(System.currentTimeMillis());
        Map<String, String> map = service.refund(1, reqsn, "", "20160712167578.2547");
        print(map);
    }
    
    public static void testCancel() throws Exception{
        SybPayService service = new SybPayService();
        String reqsn = String.valueOf(System.currentTimeMillis());
        Map<String, String> map = service.cancel(1, reqsn, "112094120001239205", "");
        print(map);
    }
    
    
    public static void print(Map<String, String> map){
        System.out.println("返回数据如下:");
        if(map!=null){
            for(String key:map.keySet()){
                System.out.println(key+";"+map.get(key));
            }
        }
    }
    
    
}