| | |
| | | return getVerifyCodeNew(phone); |
| | | } |
| | | |
| | | private boolean sendYp(String phone, String code){ |
| | | /** |
| | | * 云片验证码 |
| | | * @param phone 手机 |
| | | * @param code 验证码 |
| | | * @return 结果 |
| | | */ |
| | | private boolean sendYp(String phone, String code) |
| | | { |
| | | String result = smsApi.sendSms(phone, StringUtils.format(YPSmsApi.CODE_TMP, code, Constants.PHONE_EXPIRATION)); |
| | | if (result.contains("\"code\":0,\"msg\":\"OK\"")){ |
| | | log.info("发送成功 ->验证码:"+code); |
| | |
| | | return false; |
| | | } |
| | | |
| | | private boolean sendAl(String phone, String code ){ |
| | | /** |
| | | * 阿里验证码 |
| | | * @param phone 手机 |
| | | * @param code 验证码 |
| | | * @return 结果 |
| | | */ |
| | | private boolean sendAl(String phone, String code ) |
| | | { |
| | | DefaultProfile profile = DefaultProfile.getProfile("cn-beijing", AliyunSmsConstants.SMS_APPID, AliyunSmsConstants.SMS_SECRET); |
| | | IAcsClient client = new DefaultAcsClient(profile); |
| | | CommonRequest request = new CommonRequest(); |