| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- class LewaimaiAboutLekuaisong {
- //获取访问乐快送接口的请求数组
- public static function CreateRequest()
- {
- $timestamp = time();
- $nonce = LewaimaiString::create_noncestr(9);
- $apikey = LEKUAISONG_APIKEY;
- $secretkey = LEKUAISONG_SECRETKEY;
-
- $params = array($timestamp, $nonce, $apikey, $secretkey);
- sort($params, SORT_STRING);
-
- $signature = sha1( implode( $params ) );
- $post['sign'] = array(
- 'timestamp' => $timestamp,
- 'nonce' => $nonce,
- 'apikey' => $apikey,
- 'signature' => $signature
- );
- return $post;
- }
-
- //获取访问乐快送跑腿接口的请求数组
- public static function CreateErrandRequest()
- {
- $timestamp = time();
- $nonce = LewaimaiString::create_noncestr(9);
- $apikey = LEKUAISONG_ERRAND_APIKEY;
- $secretkey = LEKUAISONG_ERRAND_SECRETKEY;
-
- $params = array($timestamp, $nonce, $apikey, $secretkey);
- sort($params, SORT_STRING);
-
- $signature = sha1( implode( $params ) );
- $post['sign'] = array(
- 'timestamp' => $timestamp,
- 'nonce' => $nonce,
- 'apikey' => $apikey,
- 'signature' => $signature
- );
- return $post;
- }
- }
|