黄宗昌 2 år sedan
förälder
incheckning
245497f656

+ 1 - 0
app/Admin/Controllers/UserMemberOrderController.php

xqd
@@ -35,6 +35,7 @@ class UserMemberOrderController extends AdminController
             })->label();
             $grid->column('days');
             $grid->column('money');
+            $grid->column('order_no');
             $grid->column('status')->display(function (){
                 return $this->status_text;
             })->label(['gray', 'success']);

+ 4 - 1
app/Http/Controllers/V1/MemberController.php

xqd xqd
@@ -49,6 +49,9 @@ class MemberController extends Controller
             $data = [
                 'user_id' => $this->userId,
                 'days' => 30,// 续费时间 = 默认一个月30天
+                'pay_type'=>0,
+                'status'=>0,
+                'order_no' => date('YmdHis') . str_pad(mt_rand(1, 999), 3, '0', STR_PAD_LEFT), // 订单号
                 'money' => UserMember::query()->where('id',2)->value('money') // 续费金额
             ];
             $order = UserMemberOrder::query()->create($data);
@@ -67,7 +70,7 @@ class MemberController extends Controller
      */
     public function payment(){
 
-        
+
 
     }
 

+ 41 - 414
app/Http/Controllers/V1/PayController.php

xqd
@@ -1,436 +1,63 @@
 <?php
 
 namespace App\Http\Controllers\V1;
-
-use Omnipay\Omnipay;
-use App\Helper\LogHelper;
-use App\Helper\PayHelper;
-use App\Helper\JpushHelper;
-use App\Models\User;
-use App\Models\order;
-use App\Models\AccountLog;
-use App\Services\Base\ErrorCode;
-use Illuminate\Support\Facades\Request;
-use Illuminate\Support\Facades\Validator;
-use Illuminate\Support\Facades\DB;
-use Illuminate\Support\Facades\Config;
-use Illuminate\Support\Facades\Auth;
-use Illuminate\Support\Facades\Log;
-
-
+use App\Models\UserMemberOrder;
+use Illuminate\Http\Request;
+
+use Alipay\EasySDK\Kernel\Factory;
+use Alipay\EasySDK\Kernel\Util\ResponseChecker;
+use Alipay\EasySDK\Kernel\Config;
+/**
+ * 支付
+ */
 class PayController extends Controller
 {
-    use PayHelper, LogHelper,JpushHelper;
-
-    public function alipayNotify() {
-        $rawInfo = Request::all();
-        Log::info('aliplay callback');
-        Log::info($rawInfo);
-
-        $config = Config::get('laravel-omnipay.gateways.alipay');
-
-        $gateway = Omnipay::create($config['driver']);
-        print_r($gateway);exit;
-        $gateway->setEnvironment($config['options']['environment']);
-        $gateway->setAppId($config['options']['appid']);
-        $gateway->setEncryptKey($config['options']['encrypt_key']);
-        $gateway->setPrivateKey($config['options']['prikey']);
-        $gateway->setAlipayPublicKey($config['options']['ali_pubkey']);
-        $gateway->setNotifyUrl($config['options']['notify_url']);
-
-        $request = $gateway->completePurchase();
-        $request->setParams($rawInfo);//Optional
-
-        try {
-            $response = $request->send();
-
-            if($response->isPaid()){
-              echo 1;exit;
-//                 Log::info('支付成功');
-
-//                 $out_trade_no = $rawInfo['out_trade_no'];
-//                 $order = Order::where('transaction_id', '=', $out_trade_no)->first();
-//                 if (!$order) {
-//                     Log::error('找不到订单' . $out_trade_no);
-//                     return 'fail';
-//                 }
-//                 $master_amount =  $order->number;
-//                 $slave_amount = 0;
-//                 if (!empty($order->ext_info)) {
-//                     $extInfo = json_decode($order->ext_info, true);
-//                     if ($extInfo !== null) {
-//                         $cc = $extInfo['cc_bonus'];
-//                         $master_amount = round(($cc / 100) * $order->number);
-//                         $slave_amount = $order->number - $master_amount;
-//                     }
-//                 }
-//                 $tp = '';
-// //                $u = null;
-//                 if ($order->user_type == Order::USER_TYPE_MERCHANT) {
-//                     $tp = 'Merchant';
-// //                    $u = Merchant::find($order->user_id);
-//                 } elseif ($order->user_type == Order::USER_TYPE_MEMBER) {
-//                     $tp = 'Member';
-//                     //Not handled here
-//                 }
-//                 $u = User::find($order->user_id);
-//                 if (!$u) {
-//                     Log::error('用户不存在' . $order->user_type . ', ' . $order->user_id);
-//                     return 'success';
-//                 }
-
-//                 DB::beginTransaction();
-
-//                 if ($order->goods_type == Order::GOODS_TYPE_BALANCE||$order->goods_type == Order::GOODS_TYPE_COSUME) {
-//                     $cType = AccountLog::TYPE_BALANCE;
-// //                    $u->account_balance += $order->number;
-//                     $u->balance += $master_amount;
-//                 } elseif ($order->goods_type == Order::GOODS_TYPE_CREDIT) {
-//                     $cType = AccountLog::TYPE_CREDIT;
-// //                    $u->credit_balance += $order->number;
-//                     $u->credit += $master_amount;
-//                 } else {
-//                     Log::error('商品不存在' . $order->goods_type);
-//                     return 'success';
-//                 }
-//                 Log::info('支付金额 '.$master_amount);
-//                 if ($u->save()) {
-
-//                     //更新订单状态
-//                     $order->status = Order::STATUS_FINISHED;
-//                     $order->save();
-
-//                     //记日志
-//                     $amount = $rawInfo['total_amount'] * 100;
-//                     $_ops = AccountLog::getAllop();
-//                     $this->logAccount($tp, $u->id, $u->name,
-//                             AccountLog::OP_CHARGE, $cType, $master_amount,
-//                             AccountLog::DIRECTION_INC, $cType == AccountLog::TYPE_BALANCE ? $u->balance : $u->credit, AccountLog::CHANNEL_ALIPAY);
-
-//                     Log::info('支付完成');
-
-//                 } else {
-//                     DB::rollBack();
-//                     Log::error('保存数据失败');
-//                 }
-
-//                 DB::commit();
-
-//                 return 'success';
-            }else{
-                Log::error('支付失败');
-
-                return 'fail';
-            }
-        } catch (\Exception $e) {
-            Log::error('支付异常' . $e->getMessage());
+    public function __construct()
+    {
+        $this->user = auth('api')->user();
+        $this->userId = $this->user ? $this->user->id : 0;
 
-            return 'fail';
+        //如果用户被删除,会自动退出登录
+        if (!empty($this->user->deleted_at)) {
+            $this->user->online = 0;
+            $this->user->save();
+            auth('api')->logout();
         }
-
+        Factory::setOptions($this->getOptions());
     }
 
-    public function wechatpayNotify() {
-        Log::debug('wechatpay callback');
-//        Log::debug(Request::all());
-
-        $config = Config::get('laravel-omnipay.gateways.wechatpay');
-
-        $gateway = Omnipay::create("WechatPay");
-//        $gateway->setEnvironment('sandbox');
-        $gateway->setAppId($config['options']['appid']);
-        $gateway->setMchId($config['options']['merchant_id']);
-        $gateway->setApiKey($config['options']['apikey']);
-
-        $response = $gateway->completePurchase([
-            'request_params' => file_get_contents('php://input')
-        ])->send();
-        try {
-            if ($response->isPaid()) {
-                //pay success
-                // $rawInfo = $response->getRequestData();
-                // Log::debug($rawInfo);
-                // Log::info('支付成功');
-
-                // $out_trade_no = $rawInfo['out_trade_no'];
-                // $order = order::where('transaction_id', '=', $out_trade_no)->first();
-                // if (!$order) {
-                //     Log::error('找不到订单' . $out_trade_no);
-                //     return 'fail';
-                // }
-                // $u = User::find($order->user_id);
-                // if (!$u) {
-                //     Log::error('用户不存在' . $order->user_id . ', ' . $order->user_id);
-                //     return 'success';
-                // }
-
-                // DB::beginTransaction();
-                // $u->coin += $order->number;
-                // if ($u->save()) {
-
-                //     //更新订单状态
-                //     $order->status = order::STATUS_FINISHED;
-                //     $order->save();
-
-                //     //记日志
-                //     $_types = AccountLog::getAllType();
-                //     $_ops = AccountLog::getAllop();
-                //     $this->logAccount($_types[AccountLog::TYPE_CASH], $u->id, $u->name,$order->amount,
-                //         $_ops[AccountLog::OP_CHARGE],
-                //         $_types[AccountLog::TYPE_COIN], $u->id,$u->name,$order->amount,$out_trade_no,'http://miao.beiyuesi.com/base/img/wechat.png');
-
-                //     Log::info('支付完成');
-
-                // } else {
-                //     DB::rollBack();
-                //     Log::error('保存数据失败');
-                // }
-
-                // DB::commit();
-
-                // return 'success';
-            }else{
-                //pay fail
-                Log::error($response->getData());
-                return 'fail';
-            }
+    public function getOptions(){
+        $options = new Config();
+        $options->protocol = 'https';
+        $options->gatewayHost = 'openapi.alipay.com';
+        $options->signType = 'RSA2';
 
-        } catch (\Exception $e) {
-            Log::error('支付异常' . $e->getMessage());
+        $options->appId = '2016082201783461';
 
-            return 'fail';
-        }
+        $options->merchantPrivateKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6x0l1piPwoCObHcvkViykIsY+D8FJ5Cqvr0sUkpFgQpy9Mt/0zkA0gnWBDS3OtZl2QYuwKuooBrexa+Snbpd+SsTLGWtTieIt3xhtctigtw3j88HbiEZ/J/yDYCgHjgMCWglhYUOVMfnOFNqRTFhbSioKX1atmKLZvKR/iFFH5Sp9lIZUrutFvbB6fyyKqx4IdTc7ZxEBuwYZafuUSe6h4mYtQvPMPfbPX3+N0wLlhYjeiUMJiDC5x+V7CVP6muxuEKzBWsDyl8lP7bwfyAuaVlCX0QvsdNyTLwU/g2fagyHMg0Yd1rJnW/LWCp8OcKc0S2Q2NTCRut72i4jEU0bFwIDAQAB';
+        $options->alipayPublicKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjkCziKKZaCde/Wyf29S7Z/lvVLcecLQzJa2V6EGCsBbN8GA/kF7dnHPbzps32eurMIysvmhhulAd+D3O/580lQh6cmcUVc3EZ01lfq2Ki+jM2B8EVTyegqS9ADsIVGa//1hJ7i2J2ulgD1Ros5WBZ8rebsd6Qhq/0uJeOksEFA/Fxv209yp+gKnidUozX7ACDalqHp38OeRw0YWRRICyKh1pPkW7n+hj2GElIBPZUc9SWPkNIkCHwExjV1ha6BkrdiBeLrkKjgh1ul6rTG7AeQdtW54nOWmt7caNJ/swnA7zi8n9j/FAzF9tz4mflVCvdOZYO0PCs+Gea4QVYh2X3wIDAQAB';
+//        $options->notifyUrl = ''
+        return $options;
     }
-
-
-
     /**
-     * @api {post} /api/pay/charge 充值
-     * @apiDescription 充值(向平台充值)
-     * @apiGroup User
-     * @apiPermission Passport
-     * @apiVersion 0.1.0
-     * @apiParam {int}  [goods=1]   充值商品(1:梦想币)
-     * @apiParam {int}  number      充值数量,人民币,以分表示
-     * @apiParam {int}  type        支付类型(1:支付宝,2:微信支付)
-     * @apiSuccessExample {json} Success-Response:
-     * HTTP/1.1 200 OK
-     * {
-     *     "state": true,
-     *     "code": 0,
-     *     "message": "",
-     *     "data": {
-     *         "id": 2,
-     *         "code": "ALIPAY_201610231314145719",
-     *         "transaction_id": "201610231314145719",
-     *         "user_type": 2,
-     *         "user_id": 1,
-     *         "goods_type": 1,
-     *         "price": 1,
-     *         "number": 1,
-     *         "amount": 1,
-     *         "pay_type": 1,
-     *         "status": 0,
-     *         "created_at": "2016-10-23 13:14:14",
-     *         "updated_at": "2016-10-23 13:14:14",
-     *         "orderString": "alipay_sdk=lokielse%2Fomnipay-alipay&app_id=2016091201894867&biz_content=%7B%22subject%22%3A%22%5Cu7532%5Cu8c61%5Cu8054%5Cu5408-%5Cu4f59%5Cu989d%5Cu5145%5Cu503c%22%2C%22out_trade_no%22%3A%22201610231314145719%22%2C%22total_amount%22%3A0.01%2C%22product_code%22%3A1%7D&charset=UTF-8&format=JSON&method=alipay.trade.app.pay&notify_url=http%3A%2F%2Fweb%2Fapi%2Fpay%2Falipay%2Fnotify&sign_type=RSA&timestamp=2016-10-23+13%3A14%3A14&version=1.0&sign=oxKM0qGMHLWDlMrXHIiy9%2Fk2BXJq3rC3RKdmcfFwkBJVRXvtG6cBoAYPll6VxJYOMQWeu78Ibfov%2FxIVCuN9yUfzEiokfQrzBoptc94bCQ5k0pNyJcSdgezOUKHB12P5Zmm3Hd6AAbGRDV9UCaLVz0wYkFJPrCyUv1ZfhrM%2BBqc%3D"
-     *     }
-     * }
-     * @apiErrorExample {json} Error-Response:
-     * HTTP/1.1 400 Bad Request
-     * {
-     *     "state": false,
-     *     "code": 1000,
-     *     "message": "传入参数不正确",
-     *     "data": null or []
-     * }
-     * 可能出现的错误代码:
-     * 1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     * @return void
+     * 构建支付
      */
-    public function charge(Request $request)
-    {
-        $goodsTypes = order::getAllGoodsTypes();
-        $gTypes = array_keys($goodsTypes);
-        $payTypes = order::getAllPayTypes();
-        $pTypes = array_keys($payTypes);
-        $validator = Validator::make($data = $request->all(),
-            [
-                'number' => 'required|integer|min:1',
-                'type' => 'required|in:' . join(',', $pTypes),
-                'goods' => 'in:' . join(',', $gTypes),
-            ],
-            [
-                'number.required' => '请输入梦想币数量',
-                'number.integer' => '梦想币数量必须为整数',
-                'number.min' => '充值梦想币数量至少为1',
-                'type.required' => '支付类型必填',
-                'type.in' => '支付类型非法',
-                'goods.in' => '充值商品非法',
-            ]
-        );
-
-        if ($validator->fails()) {
-            return $this->validatorError($validator->messages()->all(), ErrorCode::CLIENT_WRONG_PARAMS);
-        }
+    public function payment(Request $request){
 
-        $user = Auth::guard('api')->user();
-        $data['goods_id'] = 1;
-        if (!isset($data['goods'])) {//默认充余额
-            $data['goods'] = order::GOODS_TYPE_COIN;
-        }
-        $data['user_id'] = $user->id;
-        if ($data['type'] == order::PAY_TYPE_ALIPAY) {
-            $result = $this->createAlipayCharge($data);
-        } else {
-            $result = $this->createWechatpayCharge($data);
+        $order_id = $request->get('order_id');
+        $pay_type = $request->get('pay_type');
+        if(!$order_id || !$pay_type){
+            return $this->error("缺少参数!");
         }
-
-        if ($result === false) {
-            return $this->error(ErrorCode::ORDER_GENERATE_FAILED);
+        $order = UserMemberOrder::query()->where('id',$order_id)->first();
+        if(!$order){
+            return $this->error("订单不存在!");
         }
-        //log
-//        $data['amount'] = $data['number'];
-//        $this->chargeLog('Merchant', $merchant->id, $merchant->name,
-//            'balance', $data['amount'], 'balance', $data['amount'],
-//            'Merchant', $user->id, $merchant->name);
-
-        return $this->api($result);
-    }
-
-    /**
-     * @api {post} /api/pay/order_status 订单状态查询
-     * @apiDescription 订单状态查询
-     * @apiGroup User
-     * @apiPermission Passport
-     * @apiVersion 0.1.0
-     * @apiParam {int}  [goods=1]   充值商品(1:梦想币)
-     * @apiParam {int}  number      充值数量,人民币,以分表示
-     * @apiParam {int}  type        支付类型(1:支付宝,2:微信支付)
-     * @apiSuccessExample {json} Success-Response:
-     * HTTP/1.1 200 OK
-     * {
-     *     "state": true,
-     *     "code": 0,
-     *     "message": "",
-     *     "data": {
-     *         "id": 2,
-     *         "code": "ALIPAY_201610231314145719",
-     *         "transaction_id": "201610231314145719",
-     *         "user_type": 2,
-     *         "user_id": 1,
-     *         "goods_type": 1,
-     *         "price": 1,
-     *         "number": 1,
-     *         "amount": 1,
-     *         "pay_type": 1,
-     *         "status": 0,
-     *         "created_at": "2016-10-23 13:14:14",
-     *         "updated_at": "2016-10-23 13:14:14",
-     *         "orderString": "alipay_sdk=lokielse%2Fomnipay-alipay&app_id=2016091201894867&biz_content=%7B%22subject%22%3A%22%5Cu7532%5Cu8c61%5Cu8054%5Cu5408-%5Cu4f59%5Cu989d%5Cu5145%5Cu503c%22%2C%22out_trade_no%22%3A%22201610231314145719%22%2C%22total_amount%22%3A0.01%2C%22product_code%22%3A1%7D&charset=UTF-8&format=JSON&method=alipay.trade.app.pay&notify_url=http%3A%2F%2Fweb%2Fapi%2Fpay%2Falipay%2Fnotify&sign_type=RSA&timestamp=2016-10-23+13%3A14%3A14&version=1.0&sign=oxKM0qGMHLWDlMrXHIiy9%2Fk2BXJq3rC3RKdmcfFwkBJVRXvtG6cBoAYPll6VxJYOMQWeu78Ibfov%2FxIVCuN9yUfzEiokfQrzBoptc94bCQ5k0pNyJcSdgezOUKHB12P5Zmm3Hd6AAbGRDV9UCaLVz0wYkFJPrCyUv1ZfhrM%2BBqc%3D"
-     *     }
-     * }
-     * @apiErrorExample {json} Error-Response:
-     * HTTP/1.1 400 Bad Request
-     * {
-     *     "state": false,
-     *     "code": 1000,
-     *     "message": "传入参数不正确",
-     *     "data": null or []
-     * }
-     * 可能出现的错误代码:
-     * 1000    CLIENT_WRONG_PARAMS             传入参数不正确
-     */
-
-    public function orderStatus(Request $request)
-    {
 
-        $validator = Validator::make($data = $request->all(),
-            [
-                'number' => 'required|integer|min:1',
-                'type' => 'required|in:' . join(',', $pTypes),
-                'goods' => 'in:' . join(',', $gTypes),
-            ],
-            [
-                'number.required' => '请输入梦想币数量',
-                'number.integer' => '梦想币数量必须为整数',
-                'number.min' => '充值梦想币数量至少为1',
-                'type.required' => '支付类型必填',
-                'type.in' => '支付类型非法',
-                'goods.in' => '充值商品非法',
-            ]
-        );
+        $result = Factory::payment()->common()->create("加入企业会员",$order->order_no,0.01,1);
 
-        if ($validator->fails()) {
-            return $this->validatorError($validator->messages()->all(), ErrorCode::CLIENT_WRONG_PARAMS);
-        }
-        $order = new order();
-        $order->code            = $data['code'];
-        $order->transaction_id  = $data['transaction_id'];
-        $order->user_id         = $data['user_id'];
-        $order->goods_id        = $data['goods_id'];
-        $order->price           = $data['price'];
-        $order->number          = $data['number'];
-        $order->amount          = $data['amount'];
-        $order->pay_type        = $data['pay_type'];
-        if (isset($data['ext_info'])) {
-            $order->ext_info = $data['ext_info'];
-        }
-
-        if ($order->save()) {
-            return $order->find($order->id);
-        }
-        return $this->api('');
+        dd($result);
     }
 
-    public function orderIos(Request $request)
-    {
-
-        $validator = Validator::make($data = $request->all(),
-            [
-                'number' => 'required',
-            ],
-            [
-                'number.required' => '请输入产品ID',
-            ]
-        );
-
-        if ($validator->fails()) {
-            return $this->validatorError($validator->messages()->all(), ErrorCode::CLIENT_WRONG_PARAMS);
-        }
-//        $order = new order();
-
-        Log::info($data['number']);
-
-        $AppleProducts = order::getAllAppleProducts();
-        $coin = 0 ;
-        if(isset($AppleProducts[$data['number']])){
-            $coin = $AppleProducts[$data['number']];
-        }
-//        $order->code            = $data['code'];
-//        $order->transaction_id  = $data['transaction_id'];
-//        $order->user_id         = $data['user_id'];
-//        $order->goods_id        = $data['goods_id'];
-//        $order->price           = $data['price'];
-//        $order->number          = $data['number'];
-//        $order->amount          = $data['amount'];
-//        $order->pay_type        = $data['pay_type'];
-
-        //更新订单状态
-//        $order->status = order::STATUS_FINISHED;
-//        $order->save();
-
-        $u = Auth::guard('api')->user();
-        $u->coin += $coin;
-        $u->save();
-        //记日志
-        $_types = AccountLog::getAllType();
-        $_ops = AccountLog::getAllop();
-        $this->logAccount($_types[AccountLog::TYPE_CASH], $u->id, $u->name,$coin,
-            $_ops[AccountLog::OP_CHARGE],
-            $_types[AccountLog::TYPE_COIN], $u->id,$u->name,$coin,$data['number'],'http://miao.beiyuesi.com/base/img/apple.png');
-
-        Log::info('支付完成');
-
-        return $this->api('');
-    }
 }

+ 6 - 5
app/Models/UserMemberOrder.php

xqd
@@ -12,11 +12,12 @@ class UserMemberOrder extends Model
     protected $table = 'user_member_orders';
 
     protected $fillable = [
-      'user_id',
-      'pay_type',
-      'money',
-      'status',
-      'days'
+        'user_id',
+        'pay_type',
+        'money',
+        'status',
+        'days',
+        'order_no'
     ];
     protected $appends = [
         'pay_type_text',

+ 1 - 0
composer.json

xqd
@@ -7,6 +7,7 @@
     "require": {
         "php": "^7.3|^8.0",
         "alibabacloud/iot": "^1.8",
+        "alipaysdk/easysdk": "^2.2",
         "api-ecosystem-for-laravel/dingo-api": "^v3.1.1",
         "dcat/easy-excel": "^1.0",
         "dcat/laravel-admin": "2.*",

+ 183 - 1
composer.lock

xqd xqd
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "9d0a26867645f0c230fc69fc9e26e6bb",
+    "content-hash": "49749ea095e75e6e4958bcc7bced5fec",
     "packages": [
         {
             "name": "adbario/php-dot-notation",
@@ -214,6 +214,188 @@
             },
             "time": "2021-04-29T09:15:22+00:00"
         },
+        {
+            "name": "alibabacloud/tea",
+            "version": "3.1.24",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/aliyun/tea-php.git",
+                "reference": "bb33395f47db3847d1940d6eb8ba1e56cd0623cb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/aliyun/tea-php/zipball/bb33395f47db3847d1940d6eb8ba1e56cd0623cb",
+                "reference": "bb33395f47db3847d1940d6eb8ba1e56cd0623cb",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "adbario/php-dot-notation": "^2.3",
+                "ext-curl": "*",
+                "ext-json": "*",
+                "ext-libxml": "*",
+                "ext-mbstring": "*",
+                "ext-openssl": "*",
+                "ext-simplexml": "*",
+                "ext-xmlwriter": "*",
+                "guzzlehttp/guzzle": "^6.3|^7.0",
+                "php": ">=5.5"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "*",
+                "symfony/dotenv": "^3.4",
+                "symfony/var-dumper": "^3.4"
+            },
+            "suggest": {
+                "ext-sockets": "To use client-side monitoring"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "AlibabaCloud\\Tea\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Alibaba Cloud SDK",
+                    "email": "sdk-team@alibabacloud.com",
+                    "homepage": "http://www.alibabacloud.com"
+                }
+            ],
+            "description": "Client of Tea for PHP",
+            "homepage": "https://www.alibabacloud.com/",
+            "keywords": [
+                "alibabacloud",
+                "client",
+                "cloud",
+                "tea"
+            ],
+            "support": {
+                "issues": "https://github.com/aliyun/tea-php/issues",
+                "source": "https://github.com/aliyun/tea-php"
+            },
+            "time": "2022-07-18T11:27:29+00:00"
+        },
+        {
+            "name": "alibabacloud/tea-fileform",
+            "version": "0.3.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/alibabacloud-sdk-php/tea-fileform.git",
+                "reference": "4bf0c75a045c8115aa8cb1a394bd08d8bb833181"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/alibabacloud-sdk-php/tea-fileform/zipball/4bf0c75a045c8115aa8cb1a394bd08d8bb833181",
+                "reference": "4bf0c75a045c8115aa8cb1a394bd08d8bb833181",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "alibabacloud/tea": "^3.0",
+                "php": ">5.5"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.35|^5.4.3"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "AlibabaCloud\\Tea\\FileForm\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Alibaba Cloud SDK",
+                    "email": "sdk-team@alibabacloud.com"
+                }
+            ],
+            "description": "Alibaba Cloud Tea File Library for PHP",
+            "support": {
+                "issues": "https://github.com/alibabacloud-sdk-php/tea-fileform/issues",
+                "source": "https://github.com/alibabacloud-sdk-php/tea-fileform/tree/0.3.4"
+            },
+            "time": "2020-12-01T07:24:35+00:00"
+        },
+        {
+            "name": "alipaysdk/easysdk",
+            "version": "2.2.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/alipay/alipay-easysdk.git",
+                "reference": "c6008839a22a5fca08e9f8536730f7abfed522d5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/alipay/alipay-easysdk/zipball/c6008839a22a5fca08e9f8536730f7abfed522d5",
+                "reference": "c6008839a22a5fca08e9f8536730f7abfed522d5",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "alibabacloud/tea": "^3.1",
+                "alibabacloud/tea-fileform": "^0.3.2",
+                "ext-ctype": "*",
+                "ext-curl": "*",
+                "ext-dom": "*",
+                "ext-fileinfo": "*",
+                "ext-json": "*",
+                "ext-libxml": "*",
+                "ext-mbstring": "*",
+                "ext-openssl": "*",
+                "ext-simplexml": "*",
+                "ext-xmlwriter": "*",
+                "guzzlehttp/guzzle": ">=6.3",
+                "php": ">=7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.5"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Alipay\\EasySDK\\": "php/src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "junying.wjy",
+                    "email": "junying.wjy@antfin.com"
+                }
+            ],
+            "description": "支付宝官方 Alipay Easy SDK",
+            "support": {
+                "source": "https://github.com/alipay/alipay-easysdk/tree/v2.2.3"
+            },
+            "time": "2022-11-28T14:04:57+00:00"
+        },
         {
             "name": "aliyuncs/oss-sdk-php",
             "version": "v2.5.0",

+ 8 - 0
config/alipay.php

xqd
@@ -0,0 +1,8 @@
+<?php
+return [
+    'app_id' => env('ALIPAY_APP_ID','2016082201783461'),
+    'private_key' => env('ALIPAY_PRIVATE_KEY','MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6x0l1piPwoCObHcvkViykIsY+D8FJ5Cqvr0sUkpFgQpy9Mt/0zkA0gnWBDS3OtZl2QYuwKuooBrexa+Snbpd+SsTLGWtTieIt3xhtctigtw3j88HbiEZ/J/yDYCgHjgMCWglhYUOVMfnOFNqRTFhbSioKX1atmKLZvKR/iFFH5Sp9lIZUrutFvbB6fyyKqx4IdTc7ZxEBuwYZafuUSe6h4mYtQvPMPfbPX3+N0wLlhYjeiUMJiDC5x+V7CVP6muxuEKzBWsDyl8lP7bwfyAuaVlCX0QvsdNyTLwU/g2fagyHMg0Yd1rJnW/LWCp8OcKc0S2Q2NTCRut72i4jEU0bFwIDAQAB'),
+    'ali_public_key' => env('ALIPAY_PUBLIC_KEY','MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjkCziKKZaCde/Wyf29S7Z/lvVLcecLQzJa2V6EGCsBbN8GA/kF7dnHPbzps32eurMIysvmhhulAd+D3O/580lQh6cmcUVc3EZ01lfq2Ki+jM2B8EVTyegqS9ADsIVGa//1hJ7i2J2ulgD1Ros5WBZ8rebsd6Qhq/0uJeOksEFA/Fxv209yp+gKnidUozX7ACDalqHp38OeRw0YWRRICyKh1pPkW7n+hj2GElIBPZUc9SWPkNIkCHwExjV1ha6BkrdiBeLrkKjgh1ul6rTG7AeQdtW54nOWmt7caNJ/swnA7zi8n9j/FAzF9tz4mflVCvdOZYO0PCs+Gea4QVYh2X3wIDAQAB'),
+    'notify_url' => env('ALIPAY_NOTIFY_URL'),
+    'return_url' => env('ALIPAY_RETURN_URL'),
+];

+ 2 - 1
resources/lang/ko/user-member-order.php

xqd
@@ -9,7 +9,8 @@ return [
         'pay_type' => '지불 방식',
         'status' => '상태',
         'days' => '속달 시간 (일)',
-        'money' => '금액'
+        'money' => '금액',
+        'order_no'=>'주문서 번호'
     ],
     'options' => [
     ],

+ 2 - 1
resources/lang/zh/user-member-order.php

xqd
@@ -9,7 +9,8 @@ return [
         'pay_type' => '支付方式',
         'status' => '状态',
         'days' => '续费时长(天)',
-        'money' => '续费金额'
+        'money' => '续费金额',
+        'order_no'=>'订单号'
     ],
     'options' => [
     ],

+ 6 - 1
routes/api.php

xqd
@@ -129,8 +129,13 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\V1'], function ($api)
             $api->get('image_list', 'UserFolderController@imageList');  //图片列表
         });
 
+        // 支付
+        $api->group(['prefix' => 'pay'], function($api){
+            $api->get('payment', 'PayController@payment');  //会员价格
+        });
+
     });
 
-    $api->post('pay/alipay/notify', 'PayController@alipayNotify'); //支付宝支付回调
+    $api->post('pay/alipay_notify', 'PayController@alipayNotify'); //支付宝支付回调
     $api->post('pay/wechatpay/notify', 'PayController@wechatpayNotify'); //微信支付回调
 });