• This project
    • Loading...
  • Sign in

OnePoem / OnePoem-Server

Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • OnePoem-Server
  • app
  • Payment
  • PaymentFactory.php
  • 李帅's avatar
    1.会员模板页面完成。 · e06946c0 ...
    e06946c0
    2.订单还在构思。
    李帅 authored 2022-03-10 18:02:25 +0800
PaymentFactory.php 449 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php
/**
 * Created by PhpStorm.
 * User: lishuai
 * Date: 2022/2/15
 * Time: 4:25 PM
 */

namespace App\Payment;

class PaymentFactory
{
    public function init($pay_type)
    {
        switch ($pay_type){
            case 'alipay':
                return new AliPayment();
            case 'wechat':
                return new WechatPayment();
            default:
                throw new \Exception('未知的支付方式');
        }
    }
}