package com.keao.edu.thirdparty.adapay;

import java.util.HashMap;
import java.util.Map;


public class MainDemo {


    public static void main(String[] args) throws Exception {
        //多商户测试
        //testMultiMerchant();

        testMerchant();

    }


    public static void testMerchant() throws Exception {

//        HashMap<String, Object> memberParams = new HashMap<>();
//        memberParams.put("order_no", "corp_mem_" + System.currentTimeMillis());
//        //memberParams.put("telphone", "41164452");
//        // memberParams.put("email", "ceshi@qq.com");
//
//
//        memberParams.put("member_id",                  "H004209");
//        memberParams.put("name",                       "苏州乐谷文化传播有限公司");
//        memberParams.put("prov_code",                  "0032");
//        memberParams.put("area_code",                  "3206");
//        memberParams.put("social_credit_code",         "91320508314158601J");
//        memberParams.put("social_credit_code_expires", "20991231");
//        memberParams.put("business_scope",             "文化交流活动策划、乐器培训、声乐培训、乐器批发兼零售及售后服务、面向中小学生开展的艺术培训");
//        memberParams.put("legal_person",               "蔡明哲");
//        memberParams.put("legal_cert_id",              "230204198110311914");
//        memberParams.put("legal_cert_id_expires",      "20350714");
//        memberParams.put("legal_mp",                   "18611812776");
//        memberParams.put("address",                    "江苏省苏州市干将西路515号702室");
//        memberParams.put("zip_code",                   "215002");
//        memberParams.put("bank_code",                  "3080000");
//        memberParams.put("bank_acct_type",             "1");
//        memberParams.put("card_name",                  "苏州乐谷文化传播有限公司");
//        memberParams.put("card_no",                    "512907602210601");
//
//        String path= "C:/Users/river/Desktop/imgzip/苏州乐谷文化传播有限公司.zip";
//        new CorpMember().executeCreateMember(memberParams,path);

        new CorpMember().executeQueryMember("H004209");


        //Payment.closePayment("002112020062916385810123596334923411456");
        //Map<String, Object> payment = Payment.queryPayment("002112020062914502410123569011751485440");


        // 运行支付类接口
        //String pamentId = Payment.executePaymentTest("default");

    }


    public static void testMultiMerchant() throws Exception {

        // //运行支付类接口
        String pamentId = Payment.executePaymentTest("yifuyun");

        // //运行退款类接口
        // RefundDemo.executeRefundTest("yifuyun", "002112019101420422510029799145265012736");
        // /**
        //  * 分账使用配套接口 begin
        //  */
        // /**用户类接口*/
         Map<String, Object> member = Member.executeMemberTest("app_7d87c043-aae3-4357-9b2c-269349a980d6");
        // String memberId = (String) member.get("member_id");
        // /** 结算户绑定*/
        // SettleAccountDemo.executeSettleAccountTest("yidian", "app_67ba475b-26e0-4cfa-847c-0f115cae5029", memberId);
        // /**企业开户*/
        CorpMember.executeCorpMemberTest("yifuyun", "app_67ba475b-26e0-4cfa-847c-0f115cae5029");
        // /**
        //  * 分账使用配套接口 end
        //  */
        // //对账单下载
        // BillDemo.executeBillTest("yifuyun");
        // String appId = "app_67ba475b-26e0-4cfa-847c-0f115cae5029";

        // /**
        //  * 获取云闪付用户号
        //  */
        // AdapayToolsDemo.executeToolsTest(appId, "yifuyun");
        // /**
        //  * 余额查询
        //  */
        // SettleAccountDemo.executeQueryBalance("yifuyun", appId, "member_id", "settleCount_id");
        // /**
        //  *用户取现
        //  */
        // SettleAccountDemo.executeDrawCash("yifuyun", appId, "member_id");
        // /**
        //  * 钱包登录申请
        //  */
        // AdapayToolsDemo.executeLoginTest(appId,"yifuyun");

    }


}