xuhy
2025-01-09 712f70b2936079a131ecb1e63c6d337171618cad
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.stylefeng.guns.modular.cloudPayment.example;
 
import com.unionpay.upyzt.Upyzt;
import com.unionpay.upyzt.exception.UpyztException;
import com.unionpay.upyzt.model.CusApplication;
import com.unionpay.upyzt.model.MchApplication;
import com.unionpay.upyzt.resp.CusApplicationSmsCodeResp;
import com.unionpay.upyzt.resp.MchApplicationStoreResp;
import lombok.extern.slf4j.Slf4j;
 
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
 
@Slf4j
public class CusApplicationExample implements Serializable {
 
 
    /**
     * 个人用户进件-短信验证码
     *
     * @return 返回
     * @throws UpyztException 异常
     */
    public static CusApplicationSmsCodeResp smsCode(String phone) throws UpyztException {
        Map<String, Object> params = new HashMap<>();
        params.put("mobile_number", phone);
        return CusApplication.sendSmsCode(params);
    }
 
//    public static MchApplicationStoreResp smsCode1(String phone) throws UpyztException {
//        Map<String, Object> businessLicence = new HashMap<>();
//        businessLicence.put("number", "911508025788878164");
//        businessLicence.put("company_name", "巴彦淖尔市震通出租汽车有限公司");
//        businessLicence.put("company_address", "内蒙古自治区巴彦淖尔市临河区临路农星种子站科研所南院");
//        businessLicence.put("valid_time", "2011-08-10,2031-08-09");
////        businessLicence.put("copy", tEnterpriseWithdrawal.getCopy1());
//
//        Map<String, Object> legalPersonIdCard = new HashMap<>();
//        legalPersonIdCard.put("type", String.valueOf(tEnterpriseWithdrawal.getCorporateCertificateType()));
//        legalPersonIdCard.put("number", Upyzt.encryptField(tEnterpriseWithdrawal.getCertificateCode()));
//        legalPersonIdCard.put("name", Upyzt.encryptField(tEnterpriseWithdrawal.getCorporateName()));
//        legalPersonIdCard.put("valid_time", tEnterpriseWithdrawal.getCertificateExpireTime());
//        legalPersonIdCard.put("copy", tEnterpriseWithdrawal.getCopy2());
//        legalPersonIdCard.put("national", tEnterpriseWithdrawal.getCopy3());
//
//        Map<String, Object> settleAcct = new HashMap<>();
//        settleAcct.put("type", String.valueOf(tEnterpriseWithdrawal.getAccountType()));
//        settleAcct.put("bank_code", tEnterpriseWithdrawal.getBankCode());
//        settleAcct.put("name", Upyzt.encryptField(tEnterpriseWithdrawal.getDepositName()));
////        settleAcct.put("bank_address_code", "110105");
//        settleAcct.put("bank_branch_code", tEnterpriseWithdrawal.getBankBranchCode());
//        settleAcct.put("bank_acct_no", Upyzt.encryptField(tEnterpriseWithdrawal.getBankAccount()));
//
//        Map<String, Object> params = new HashMap<>();
//        params.put("out_request_no", tEnterpriseWithdrawal.getOutRequestNo());
//        params.put("organization_type", String.valueOf(tEnterpriseWithdrawal.getEnterpriseType()));
//        params.put("short_name", tEnterpriseWithdrawal.getMerchantAbbreviation());
//        params.put("business_license", businessLicence);
//        params.put("settle_acct", settleAcct);
//        params.put("legal_person_id_card", legalPersonIdCard);
//        params.put("legal_person_mobile_number", Upyzt.encryptField(tEnterpriseWithdrawal.getCorporatePhone()));
//        // 通过[个人手机号验证码]接口获取的短信验证码,用于验证法人手机号; 是否必传取决于平台业务参数配置
//        params.put("sms_code", tEnterpriseWithdrawal.getCode());
//        params.put("contact_mobile_number", Upyzt.encryptField(tEnterpriseWithdrawal.getCorporatePhone()));
//        params.put("contact_email", Upyzt.encryptField(tEnterpriseWithdrawal.getContactsEmail()));
//        params.put("password", Upyzt.encryptField(tEnterpriseWithdrawal.getTransactionAuthorizationCode()));
//        log.info("----------------二级商户首次进件-----------------");
//        log.info("二级商户首次进件:{}",params);
//        log.info("---------------二级商户首次进件------------------");
//        return MchApplication.create(params);
//    }
 
}