Browse Source

支付宝支付充值(占不完成)

master
wanghongjun 2 years ago
parent
commit
6ae21e209b
  1. 47
      app/controller/Pay.php
  2. 68
      app/logic/AliPay.php
  3. 27
      app/validate/Pay.php
  4. 3
      composer.json
  5. 641
      composer.lock
  6. 29
      config/pay.php
  7. 7
      route/app.php

47
app/controller/Pay.php

@ -0,0 +1,47 @@
<?php
declare (strict_types = 1);
namespace app\controller;
use app\BaseController;
use app\logic\AliPay;
use app\validate\Pay as PayValidate;
use think\exception\ValidateException;
use think\facade\Request;
class Pay extends BaseController
{
/**
* 支付宝支付
* @return array|void
*/
public function pay()
{
// $param = Request::param();
//
// try {
// validate(PayValidate::class)->check($param);
//
// $data = AliPay::pay(time(),1,'test subject - 测试');
//
// return $this->renderSuccess('success',['data' => $data]);
// } catch (ValidateException $validateException) {
// return $this->renderError($validateException->getMessage());
// }
}
public function notify()
{
// AliPay::notify();
}
public function return()
{
// AliPay::return();
}
}

68
app/logic/AliPay.php

@ -0,0 +1,68 @@
<?php
namespace app\logic;
use Yansongda\Pay\Pay;
use Yansongda\Pay\Log;
class AliPay
{
# 参考网址:https://pay.yansongda.cn/docs/v2/alipay/pay.html
public static function pay($out_trade_no,$total_amount,$subject)
{
$order = [
'out_trade_no' => $out_trade_no,
'total_amount' => $total_amount,
'subject' => $subject,
];
# wap-手机网站支付 web-电脑支付 app-APP支付
$alipay = Pay::alipay(config('pay.alipay'))
->wap($order);
return $alipay->send();
}
/**
*
* @throws \Yansongda\Pay\Exceptions\InvalidConfigException
* @throws \Yansongda\Pay\Exceptions\InvalidSignException
*/
public static function return()
{
$data = Pay::alipay(config('pay.alipay'))->verify(); // 是的,验签就这么简单!
// 订单号:$data->out_trade_no
// 支付宝交易号:$data->trade_no
// 订单总金额:$data->total_amount
}
/**
* 支付宝支付回调
* @return array
*/
public static function notify()
{
$alipay = Pay::alipay(config('pay.alipay'));
try{
$data = $alipay->verify(); // 是的,验签就这么简单!
// 请自行对 trade_status 进行判断及其它逻辑进行判断,在支付宝的业务通知中,只有交易通知状态为 TRADE_SUCCESS 或 TRADE_FINISHED 时,支付宝才会认定为买家付款成功。
// 1、商户需要验证该通知数据中的out_trade_no是否为商户系统中创建的订单号;
// 2、判断total_amount是否确实为该订单的实际金额(即商户订单创建时的金额);
// 3、校验通知中的seller_id(或者seller_email) 是否为out_trade_no这笔单据的对应的操作方(有的时候,一个商户可能有多个seller_id/seller_email);
// 4、验证app_id是否为该商户本身。
// 5、其它业务逻辑情况
Log::debug('Alipay notify', $data->all());
} catch (\Exception $e) {
// $e->getMessage();
return ['status' => 0, 'msg' => $e->getMessage()];
}
return ['status' => 1, 'msg' => '', 'data' => $alipay->success()->send()];
}
}

27
app/validate/Pay.php

@ -0,0 +1,27 @@
<?php
declare (strict_types = 1);
namespace app\validate;
use think\Validate;
class Pay extends Validate
{
/**
* 定义验证规则
* 格式:'字段名' => ['规则1','规则2'...]
*
* @var array
*/
protected $rule = [
'amount|充值金额' => 'require|number'
];
/**
* 定义错误信息
* 格式:'字段名.规则名' => '错误信息'
*
* @var array
*/
protected $message = [];
}

3
composer.json

@ -27,7 +27,8 @@
"topthink/think-captcha": "^3.0",
"alibabacloud/sdk": "^1.8",
"topthink/think-filesystem": "^2.0",
"topthink/think-view": "^1.0"
"topthink/think-view": "^1.0",
"yansongda/pay": "2.10"
},
"require-dev": {
"symfony/var-dumper": "^4.2",

641
composer.lock

@ -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": "b75de1164c677670ca853a21ea34ab7a",
"content-hash": "1b7895e47b834768c79f1a78d46b7cfd",
"packages": [
{
"name": "adbario/php-dot-notation",
@ -966,6 +966,108 @@
],
"time": "2023-08-03T07:14:11+00:00"
},
{
"name": "monolog/monolog",
"version": "2.9.1",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
"reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
"shasum": ""
},
"require": {
"php": ">=7.2",
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
},
"provide": {
"psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"elasticsearch/elasticsearch": "^7 || ^8",
"ext-json": "*",
"graylog2/gelf-php": "^1.4.2 || ^2@dev",
"guzzlehttp/guzzle": "^7.4",
"guzzlehttp/psr7": "^2.2",
"mongodb/mongodb": "^1.8",
"php-amqplib/php-amqplib": "~2.4 || ^3",
"phpspec/prophecy": "^1.15",
"phpstan/phpstan": "^0.12.91",
"phpunit/phpunit": "^8.5.14",
"predis/predis": "^1.1 || ^2.0",
"rollbar/rollbar": "^1.3 || ^2 || ^3",
"ruflin/elastica": "^7",
"swiftmailer/swiftmailer": "^5.3|^6.0",
"symfony/mailer": "^5.4 || ^6",
"symfony/mime": "^5.4 || ^6"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
"ext-mbstring": "Allow to work properly with unicode symbols",
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
"ext-openssl": "Required to send log messages using SSL",
"ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "https://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "https://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/2.9.1"
},
"funding": [
{
"url": "https://github.com/Seldaek",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
"type": "tidelift"
}
],
"time": "2023-02-06T13:44:46+00:00"
},
{
"name": "mtdowling/jmespath.php",
"version": "2.6.1",
@ -1075,6 +1177,56 @@
},
"time": "2021-03-05T17:36:06+00:00"
},
{
"name": "psr/event-dispatcher",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/event-dispatcher.git",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\EventDispatcher\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Standard interfaces for event handling.",
"keywords": [
"events",
"psr",
"psr-14"
],
"support": {
"issues": "https://github.com/php-fig/event-dispatcher/issues",
"source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
},
"time": "2019-01-08T18:20:26+00:00"
},
{
"name": "psr/http-client",
"version": "1.0.2",
@ -1447,6 +1599,246 @@
],
"time": "2022-01-02T09:53:40+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v5.4.26",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac",
"reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/event-dispatcher-contracts": "^2|^3",
"symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/dependency-injection": "<4.4"
},
"provide": {
"psr/event-dispatcher-implementation": "1.0",
"symfony/event-dispatcher-implementation": "2.0"
},
"require-dev": {
"psr/log": "^1|^2|^3",
"symfony/config": "^4.4|^5.0|^6.0",
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
"symfony/error-handler": "^4.4|^5.0|^6.0",
"symfony/expression-language": "^4.4|^5.0|^6.0",
"symfony/http-foundation": "^4.4|^5.0|^6.0",
"symfony/service-contracts": "^1.1|^2|^3",
"symfony/stopwatch": "^4.4|^5.0|^6.0"
},
"suggest": {
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-07-06T06:34:20+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
"version": "v2.5.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
"reference": "f98b54df6ad059855739db6fcbc2d36995283fe1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1",
"reference": "f98b54df6ad059855739db6fcbc2d36995283fe1",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/event-dispatcher": "^1"
},
"suggest": {
"symfony/event-dispatcher-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\EventDispatcher\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to dispatching event",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-01-02T09:53:40+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v5.4.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/365992c83a836dfe635f1e903ccca43ee03d3dd2",
"reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-mbstring": "~1.1",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"predis/predis": "~1.0",
"symfony/cache": "^4.4|^5.0|^6.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/expression-language": "^4.4|^5.0|^6.0",
"symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4",
"symfony/mime": "^4.4|^5.0|^6.0",
"symfony/rate-limiter": "^5.2|^6.0"
},
"suggest": {
"symfony/mime": "To use the file extension guesser"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\HttpFoundation\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.28"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-08-21T07:23:18+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.27.0",
@ -1612,6 +2004,89 @@
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/yaml",
"version": "v2.8.52",
@ -2011,42 +2486,41 @@
"source": "https://github.com/top-think/think-view/tree/v1.0.14"
},
"time": "2019-11-06T11:40:13+00:00"
}
],
"packages-dev": [
},
{
"name": "symfony/polyfill-php72",
"version": "v1.27.0",
"name": "yansongda/pay",
"version": "v2.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97"
"url": "https://github.com/yansongda/pay.git",
"reference": "ac42d4c128bdb12a147d3fa96413fa81a8cae6fd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97",
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97",
"url": "https://api.github.com/repos/yansongda/pay/zipball/ac42d4c128bdb12a147d3fa96413fa81a8cae6fd",
"reference": "ac42d4c128bdb12a147d3fa96413fa81a8cae6fd",
"shasum": ""
},
"require": {
"php": ">=7.1"
"ext-bcmath": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-openssl": "*",
"ext-simplexml": "*",
"php": ">=7.1.3",
"symfony/event-dispatcher": "^4.0 || ^5.0",
"symfony/http-foundation": "^4.0 || ^5.0.7",
"yansongda/supports": "^2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.15",
"mockery/mockery": "^1.2",
"phpunit/phpunit": "^7.5"
},
"type": "library",
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php72\\": ""
"Yansongda\\Pay\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -2055,53 +2529,95 @@
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
"name": "yansongda",
"email": "me@yansongda.cn"
}
],
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"description": "专注 Alipay 和 WeChat 的支付扩展包",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
"alipay",
"pay",
"wechat"
],
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0"
"issues": "https://github.com/yansongda/pay/issues",
"source": "https://github.com/yansongda/pay"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
"time": "2020-08-04T15:17:09+00:00"
},
{
"name": "yansongda/supports",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/yansongda/supports.git",
"reference": "de9a8d38b0461ddf9c12f27390dad9a40c9b4e3b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yansongda/supports/zipball/de9a8d38b0461ddf9c12f27390dad9a40c9b4e3b",
"reference": "de9a8d38b0461ddf9c12f27390dad9a40c9b4e3b",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "^6.2 || ^7.0",
"monolog/monolog": "^1.23 || ^2.0",
"php": ">=7.1.3"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.15",
"phpunit/phpunit": "^7.5",
"predis/predis": "^1.1"
},
"suggest": {
"predis/predis": "Allows to use throttle feature"
},
"type": "library",
"autoload": {
"psr-4": {
"Yansongda\\Supports\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
"name": "yansongda",
"email": "me@yansongda.cn"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
"description": "common components",
"keywords": [
"Guzzle",
"array",
"collection",
"config",
"http",
"support",
"throttle"
],
"support": {
"issues": "https://github.com/yansongda/supports/issues",
"source": "https://github.com/yansongda/supports"
},
"time": "2020-10-14T08:17:18+00:00"
}
],
"packages-dev": [
{
"name": "symfony/polyfill-php80",
"name": "symfony/polyfill-php72",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97",
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97",
"shasum": ""
},
"require": {
@ -2122,21 +2638,14 @@
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
"Symfony\\Polyfill\\Php72\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
@ -2146,7 +2655,7 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
@ -2155,7 +2664,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
"source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0"
},
"funding": [
{

29
config/pay.php

@ -0,0 +1,29 @@
<?php
return [
'alipay' => [
'app_id' => '9021000126638689',
'notify_url' => 'http://localhost:8000/pay/notify',
'return_url' => 'http://localhost:8000/pay/return',
'ali_public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjhRSMS++/cPwzb4kzPYBYj9i2vKErqjNVBQNocqgTLmhQuyoA6TZJMIUuFxJp3TR3iX00iucTN4yb+DiWvjzyhvBkBvxoU0XNead+yOLBqX7DS9670xqidfcFBVIMM/mhfipMxmiRExE8oFK3ETiE3e+975wngXddyznbzTbXfAXO/RPDNCX6v92pkJ3FGrvVjw1Asyr+xL/UUdV4d6NEToY7Lu7Uy4gZkkwbt6FfZlToVBcPTWJerKkQp29CzPVhVWbbb7KIsH/r7oTgln/k7XUpoGDt4NfSLqzZv+eATpcOl0h+4iWtKMQvcE7HTAWGpGWra5zlINAFYcCeP/bPQIDAQAB',
// 加密方式: **RSA2**
'private_key' => 'MIIEogIBAAKCAQEAjTAGWZ96gNJTq2Voa+YD893AqebNoeIeha0ZjFxO6hvi2vroZ4CcLIQRKAsfSLN2/1DApBGtj3Urqnp7JXE3m264fRFz/DPcDOqIbKf8lihD9lcH8VrAHt0GolfMwBx4oVVp9VtEm58PHMXIjk9fcZJ7SVnsTIb93D5UGGH1fV+Rfomt991VNEy+Ys0Q+qopvVFE0Buni1IxIaYAlCp5rNOdttDwCC1QehlXHM99J25LZhQXIbmkoI5mrC9m3Ll5tvYCY0IrCwX74uOdI6hcUoCQAUmJ0FeWKjxfd85Ek4+SQCw7x1U+NZ0Ghnn/OJFw1ZgzELa1qw1mors9A4RmBwIDAQABAoIBAG89i4NJuAePsAS3HZMF489cxNQY2aPWuR2xyRNiF3s1BYRrdHk4R9R7KdlXCgsJ+5QmV+HtW8ZQF1t2rVhO3/VDQ3CnM69eXN6AW4Tgxo64ovOQlt1/Fyg6FWQLsXMb+5+B4L5EbsX+iLWuz9nwh87ADws4IooZQiMpqLCdXgKs9hqdo/IM7d6YZ0R71oj0jsDCuGEcOT+vAE95x93KgscXomWaqZxPg9P+KSDqIJEoCsGsE8a6jgPpzODIcRtN8O2FvxPlqDoZbnnxpSwTpPuutguHuHWwCJ2SFWsl+IXt6TKerfT6+KsRI3WAdQ0+tK8EEqwAR5LhaXevEm66YyECgYEA/EY82dp2o4JQLo5GNlhZ2fV6DewUhbdIb52mQKRHUnPF+dfvZ10TkiCSnPTNedGKX3Rt4UGfBEs3tElVvI+9xjog63Dq5lHrw75cxc9gSsV3rS9sFkRADL7jE2FpwIcgR8WbOFP+u335KuY+a0S7m5WfSpGfsElSiHFVsu7ok1sCgYEAj0XObp7k4UXBwNkr8/lqoQWvyNQuB3QN4X2urvGj9+rtMGNJxSiL80gLkgC54T/VyFGZGEsU1PkGkz0Lq4L88wd6dVq/hSLBIpHLrenN3SkRSS1MMDvA7D/s03LZLxevzlA/WJZV1APNbmcel42ljfLOPjndWq35ylYpLsn108UCgYBnpL+pTTzCrm4cwm0MNL4tctHDWIOR8Bv9Z0p/cj6vHEtw+wsrbyz0MxepDlZAvxrXXrEqA1i+Xdyz4BEuV+vCvez6bbjECVIQaGwbBLjt3zTs3PfOKhoaYm5Obw4QgDN96Sx9Nt0H0JiGzHNGhMWDBTSdYTi3J1iWH+Hykn7Q0wKBgDRK1j2p4QAX5c/tdA1oS3LaEH7McsBlq2tR5CAWMjKanFe85YAAfJQfB5oSicWc9vpWTfp/7OqOucej0E6ZUJmjcR7EMIL3XGaxsBWZ8Hl4M8bxsY0pQhD4hAfpMzvs+U3kHDrJJCpt+N0C5jeKi5JzvLMZi6E9Pp6LNBzPudnBAoGAGwdFAyyjE3NOGpjESsoAVbd2U0yOmOoMNbkmEAUWpr6WZD0KDTPRKC7jSr4aZEDSb89FIBL2Oz6BY9wv5kaqmebPfmg88QRs2d8PsVcWG8S/EyYptlPcnahJczhlumCwstt326rDxyB+mBTAOBicAuXEqPUHaB+Af7qxsPf1vLw=',
'log' => [
// optional
'file' => './logs/alipay.log',
// 建议生产环境等级调整为 info,开发环境为 debug
'level' => 'debug',
// optional, 可选 daily.
'type' => 'single',
// optional, 当 type 为 daily 时有效,默认 30 天
'max_file' => 30,
],
'http' => [ // optional
'timeout' => 5.0,
'connect_timeout' => 5.0,
// 更多配置项请参考 [Guzzle](https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html)
],
// optional,设置此参数,将进入沙箱模式
'mode' => 'dev',
]
];

7
route/app.php

@ -55,4 +55,9 @@ Route::group('agentTeam',function(){
# 总后台
# 支付(待开发)
//Route::group('pay',function (){
// Route::post('pay','pay/pay');
// Route::post('notify','pay/notify');
// Route::post('return','pay/return');
//});

Loading…
Cancel
Save