AppSecret.php 398 B

1234567891011121314151617
  1. <?php
  2. namespace app\common\modules\tripartiteApi;
  3. class AppSecret
  4. {
  5. static public function get()
  6. {
  7. $secret = \Setting::get('tripartite-app-secret');
  8. if(!isset($secret)){
  9. $secret = base64_encode(md5(md5(\YunShop::app()->uniacid) . time() . range(0, 10000)));
  10. \Setting::set('tripartite-app-secret',$secret);
  11. }
  12. return $secret;
  13. }
  14. }