12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace refill\leyou;
- # 乐友(油费)
- use mtopcard;
- class config
- {
- const ORDER_URL = 'http://lorp-api.shujubuy.com/api/v1/submitOrder';
- const QUERY_URL = 'http://lorp-api.shujubuy.com/api/v1/queryOrder';
- const BALANCE_URL = 'http://lorp-api.shujubuy.com/api/v1/queryBalance';
- const APP_KEY = '550b3e8e00144ad0b823416cfd83f1ae';
- const USER_NAME = 'guoyan';
- const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_leyou.php";
- const ExtHeaders = [
- 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
- 'X-Submit-Username: ' . self::USER_NAME
- ];
- const operator = [
- mtopcard\PetroChinaCard => 2,
- mtopcard\SinopecCard => 1,
- ];
- const product_code = [
- mtopcard\PetroChinaCard => [
- 50 => 200050,
- 100 => 200100,
- 200 => 200200,
- 500 => 200500,
- 1000 => 201000
- ],
- mtopcard\SinopecCard =>
- [
- 50 => 100050,
- 100 => 100100,
- 200 => 100200,
- 500 => 100500,
- 1000 => 101000,
- 2000 => 102000
- ],
- ];
- const SIGN_KEY_SORT = [
- 'username',
- 'orderNumber',
- 'number',
- 'productNo',
- 'money',
- 'orderTime'
- ];
- public static function extract_official_sn($voucher): string
- {
- $matches = [];
- if (preg_match("/\:(\d+)/", $voucher, $matches)) {
- return $matches[1];
- } else {
- return '';
- }
- }
- }
|