PHP code example of aishan / laravel-liumi

1. Go to this page and download the library: Download aishan/laravel-liumi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aishan / laravel-liumi example snippets

`
array:2 [▼
  "status" => 1
  "success" => array:2 [▼
    0 => array:2 [▼
      "package" => "DX10"
      "orderNO" => "586201608202319091085"
    ]
    1 => array:2 [▼
      "package" => "DX10"
      "orderNO" => "586201608202319101086"
    ]
  ]
]
`
/**
     * 根据流量套餐组合流量包
     * 流量包ID:
     *
     * 1.电信:DX5/DX10/DX30/DX50/DX100/DX200/DX500/DX1024
     * 2.移动:YD10/YD30/YD70/YD150/YD500/YD1024
     * 3.联通:LT20/LT50/LT100/LT200/LT500
     *
     *一下配置,key为要充值的流量值,value则是有对应流量套餐组成的数组
     * 下标 1为电信,2为移动,3为联通
     *
     */
    'packageConfig' => [
        '1' => [//电信
            '20'=>['DX10','DX10'],
            '50'=>['DX50'],
            '100'=>['DX100'],
            '200'=>['DX200'],
        ],
        '2' => [//移动
            '20'=>['YD10','YD10'],
            '50'=>['YD30','YD10','YD10'],
            '100'=>['YD30','YD70'],
            '200'=>['YD30','YD70','YD30','YD70'],
        ],
        '3' => [//联通
            '20'=>['LT20'],
            '50'=>['LT50'],
            '100'=>['LT100'],
            '200'=>['LT200'],
        ],
    ],