Browse Source

增加aliSms服务

alexzy 3 years ago
parent
commit
c8e3f98616
1 changed files with 23 additions and 0 deletions
  1. 23 0
      src/AliSmsServiceInterface.php

+ 23 - 0
src/AliSmsServiceInterface.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace Yxy\Service;
+
+interface AliSmsServiceInterface
+{
+    /**
+     * 发送短信验证码
+     * @param $phone
+     * @param string $scene
+     * @return bool
+     */
+    public function sendCodeSms($phone, string $scene = 'register'): bool;
+
+    /**
+     * 验证短信验证码
+     * @param $phone
+     * @param $code
+     * @param string $scene
+     * @return bool
+     */
+    public function checkSms($phone, $code, string $scene = 'register'): bool;
+}