From f2c77c457b3c38e4f9592a0beaea28c81cea0228 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Wed, 22 Dec 2021 18:50:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0OSSsts=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=87=AD=E8=AF=81=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Api/Http/Controllers/AliOssController.php | 20 + app/Endpoint/Api/routes.php | 4 + app/Services/AliStsService.php | 56 ++ app/Services/Push/MallUnipushService.php | 14 +- composer.json | 2 + composer.lock | 582 +++++++++++++++++- config/settings.php | 9 + 7 files changed, 680 insertions(+), 7 deletions(-) create mode 100644 app/Endpoint/Api/Http/Controllers/AliOssController.php create mode 100644 app/Services/AliStsService.php diff --git a/app/Endpoint/Api/Http/Controllers/AliOssController.php b/app/Endpoint/Api/Http/Controllers/AliOssController.php new file mode 100644 index 00000000..a4de3f90 --- /dev/null +++ b/app/Endpoint/Api/Http/Controllers/AliOssController.php @@ -0,0 +1,20 @@ +json(array_merge([ + 'bucket'=>config('settings.aliyun_oss_bucket'), + ], $aliStsService->createSts($request->user()->phone))); + } +} diff --git a/app/Endpoint/Api/routes.php b/app/Endpoint/Api/routes.php index df96b30b..8ef35d70 100644 --- a/app/Endpoint/Api/routes.php +++ b/app/Endpoint/Api/routes.php @@ -4,6 +4,7 @@ use App\Endpoint\Api\Http\Controllers\Account\ChangePasswordController; use App\Endpoint\Api\Http\Controllers\Account\UserController; use App\Endpoint\Api\Http\Controllers\AdController; use App\Endpoint\Api\Http\Controllers\AfterSaleController; +use App\Endpoint\Api\Http\Controllers\AliOssController; use App\Endpoint\Api\Http\Controllers\AppVersionController; use App\Endpoint\Api\Http\Controllers\ArticleController; use App\Endpoint\Api\Http\Controllers\Auth\LoginController; @@ -126,6 +127,9 @@ Route::group([ Route::get('share-bgs', [ShareBgController::class, 'index']); Route::post('user-qr-code', [ShareBgController::class, 'userQrCode']); + //OSS上传凭证 + Route::post('oss-sts', [AliOssController::class, 'sts']); + // 订单 Route::get('order/statistics', StatisticsController::class); Route::post('order/verify-order', OrderVerifyController::class); diff --git a/app/Services/AliStsService.php b/app/Services/AliStsService.php new file mode 100644 index 00000000..f56fefbf --- /dev/null +++ b/app/Services/AliStsService.php @@ -0,0 +1,56 @@ +regionId('cn-chengdu') + ->asDefaultClient(); + //设置参数,发起请求。关于参数含义和设置方法,请参见《API参考》。 + try { + $result = AlibabaCloud::rpc() + ->product('Sts') + ->scheme('https') // https | http + ->version('2015-04-01') + ->action('AssumeRole') + ->method('POST') + ->host('sts.cn-chengdu.aliyuncs.com') + ->options([ + 'query' => [ + 'RegionId' => 'cn-chengdu', + 'RoleArn' => config('settings.aliyun_oss_sts_arn'), + 'RoleSessionName' => $sessionName, + 'DurationSeconds' => $expireSeconds, + ], + ]) + ->request(); + // dd($result->toArray()); + return Arr::get($result->toArray(), 'Credentials', []); + } catch (ClientException $e) { + report($e); + // dd($e->getErrorMessage()); + // echo $e->getErrorMessage() . PHP_EOL; + } catch (ServerException $e) { + report($e); + // echo $e->getErrorMessage() . PHP_EOL; + } + return []; + } +} diff --git a/app/Services/Push/MallUnipushService.php b/app/Services/Push/MallUnipushService.php index fc4dd03a..c1fccc33 100644 --- a/app/Services/Push/MallUnipushService.php +++ b/app/Services/Push/MallUnipushService.php @@ -25,11 +25,13 @@ class MallUnipushService extends UniPushService public function push(string $sn, Message $message) { + $res = false; if ($message->user_id > 0) { - $this->pushMessage($sn, $message); + $res = $this->pushMessage($sn, $message); } else { - $this->pushAllMessage($sn, $message); + $res = $this->pushAllMessage($sn, $message); } + return $res; } /** @@ -40,7 +42,7 @@ class MallUnipushService extends UniPushService */ public function pushAllMessage(string $sn, Message $message) { - $this->pushAll($sn, $message->title, $message->content, [ + return $this->pushAll($sn, $message->title, $message->content, [ 'jump_type' => $message->jump_type == 0 ? 1 : $message->jump_type, 'jump_link' => $message->type == 1 || empty($message->jump_link) ? '/pages/news/index' : $message->jump_link, ]); @@ -56,13 +58,13 @@ class MallUnipushService extends UniPushService { //如果不是指定消息,直接退出; if (is_null($message->user)) { - return; + return false; } //如果拿不到u_cid直接退出 if (!$message->user->cid->u_cid) { - return; + return false; } - $this->pushCid($sn, $message->user->cid->u_cid, $message->title, $message->content, [ + return $this->pushCid($sn, $message->user->cid->u_cid, $message->title, $message->content, [ 'jump_type' => $message->jump_type == 0 ? 1 : $message->jump_type, 'jump_link' => $message->type == 1 || empty($message->jump_link) ? '/pages/news/index' : $message->jump_link, ]); diff --git a/composer.json b/composer.json index 63322d9e..02f6edd9 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,8 @@ }, "require": { "php": "^8.0", + "alibabacloud/sts": "^1.8", + "alphasnow/aliyun-oss-laravel": "^3.0", "dcat/laravel-admin": "2.1.5-beta", "fruitcake/laravel-cors": "^2.0", "gregwar/captcha": "^1.1", diff --git a/composer.lock b/composer.lock index 9eca24ad..ee663406 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,397 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8cdaea8176b066b5f779a5fe80f806af", + "content-hash": "3e960fc2a6ca526d5a9910e13a6668f0", "packages": [ + { + "name": "adbario/php-dot-notation", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/adbario/php-dot-notation.git", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0|^6.0", + "squizlabs/php_codesniffer": "^3.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Adbar\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Riku Särkinen", + "email": "riku@adbar.io" + } + ], + "description": "PHP dot notation access to arrays", + "homepage": "https://github.com/adbario/php-dot-notation", + "keywords": [ + "ArrayAccess", + "dotnotation" + ], + "support": { + "issues": "https://github.com/adbario/php-dot-notation/issues", + "source": "https://github.com/adbario/php-dot-notation/tree/2.x" + }, + "time": "2019-01-01T23:59:15+00:00" + }, + { + "name": "alibabacloud/client", + "version": "1.5.31", + "source": { + "type": "git", + "url": "https://github.com/aliyun/openapi-sdk-php-client.git", + "reference": "19224d92fe27ab8ef501d77d4891e7660bc023c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/openapi-sdk-php-client/zipball/19224d92fe27ab8ef501d77d4891e7660bc023c1", + "reference": "19224d92fe27ab8ef501d77d4891e7660bc023c1", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "adbario/php-dot-notation": "^2.2", + "clagiordano/weblibs-configmanager": "^1.0", + "danielstjules/stringy": "^3.1", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3|^7.0", + "mtdowling/jmespath.php": "^2.5", + "php": ">=5.5" + }, + "require-dev": { + "composer/composer": "^1.8", + "drupal/coder": "^8.3", + "ext-dom": "*", + "ext-pcre": "*", + "ext-sockets": "*", + "ext-spl": "*", + "league/climate": "^3.2.4", + "mikey179/vfsstream": "^1.6", + "monolog/monolog": "^1.24", + "phpunit/phpunit": "^5.7.27|^6.1", + "psr/cache": "^1.0", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlibabaCloud\\Client\\": "src" + }, + "files": [ + "src/Functions.php" + ] + }, + "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": "Alibaba Cloud Client for PHP - Use Alibaba Cloud in your PHP project", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibaba", + "alibabacloud", + "aliyun", + "client", + "cloud", + "library", + "sdk", + "tool" + ], + "support": { + "issues": "https://github.com/aliyun/openapi-sdk-php-client/issues", + "source": "https://github.com/aliyun/openapi-sdk-php-client" + }, + "time": "2021-05-13T06:26:38+00:00" + }, + { + "name": "alibabacloud/sts", + "version": "1.8.884", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/sts.git", + "reference": "c9807a06c7047381b8a2ab4952eb11e8d686a488" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/sts/zipball/c9807a06c7047381b8a2ab4952eb11e8d686a488", + "reference": "c9807a06c7047381b8a2ab4952eb11e8d686a488", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "alibabacloud/client": "^1.5", + "php": ">=5.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlibabaCloud\\Sts\\": "" + } + }, + "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": "Alibaba Cloud Sts SDK for PHP", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibaba", + "alibabacloud", + "aliyun", + "cloud", + "library", + "sdk", + "sts" + ], + "support": { + "issues": "https://github.com/alibabacloud-sdk-php/sts/issues", + "source": "https://github.com/alibabacloud-sdk-php/sts" + }, + "time": "2019-05-30T05:03:57+00:00" + }, + { + "name": "aliyuncs/oss-sdk-php", + "version": "v2.4.3", + "source": { + "type": "git", + "url": "https://github.com/aliyun/aliyun-oss-php-sdk.git", + "reference": "4ccead614915ee6685bf30016afb01aabd347e46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/aliyun-oss-php-sdk/zipball/4ccead614915ee6685bf30016afb01aabd347e46", + "reference": "4ccead614915ee6685bf30016afb01aabd347e46", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "*", + "satooshi/php-coveralls": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "OSS\\": "src/OSS" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aliyuncs", + "homepage": "http://www.aliyun.com" + } + ], + "description": "Aliyun OSS SDK for PHP", + "homepage": "http://www.aliyun.com/product/oss/", + "support": { + "issues": "https://github.com/aliyun/aliyun-oss-php-sdk/issues", + "source": "https://github.com/aliyun/aliyun-oss-php-sdk/tree/v2.4.3" + }, + "time": "2021-08-25T13:03:58+00:00" + }, + { + "name": "alphasnow/aliyun-oss-flysystem", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/alphasnow/aliyun-oss-flysystem.git", + "reference": "4d9e11de0f8d9035f02181f440631acaffba2b05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alphasnow/aliyun-oss-flysystem/zipball/4d9e11de0f8d9035f02181f440631acaffba2b05", + "reference": "4d9e11de0f8d9035f02181f440631acaffba2b05", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "aliyuncs/oss-sdk-php": "^2.4", + "league/flysystem": "^1.0", + "php": ">=7.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.1", + "mockery/mockery": "^1.3", + "phpstan/phpstan": "^0.12.99", + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlphaSnow\\Flysystem\\AliyunOss\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "AlphaSnow", + "email": "wind91@foxmail.com" + } + ], + "description": "Flysystem adapter for the Aliyun storage", + "homepage": "https://alphasnow.github.io/aliyun-oss-flysystem/", + "keywords": [ + "adapter", + "aliyun", + "filesystem", + "oss" + ], + "support": { + "issues": "https://github.com/alphasnow/aliyun-oss-flysystem/issues", + "source": "https://github.com/alphasnow/aliyun-oss-flysystem/tree/1.3.1" + }, + "time": "2021-10-15T03:12:13+00:00" + }, + { + "name": "alphasnow/aliyun-oss-laravel", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/alphasnow/aliyun-oss-laravel.git", + "reference": "c77b8332020bf3fafe7a5d8510c6193a9014a5df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alphasnow/aliyun-oss-laravel/zipball/c77b8332020bf3fafe7a5d8510c6193a9014a5df", + "reference": "c77b8332020bf3fafe7a5d8510c6193a9014a5df", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "alphasnow/aliyun-oss-flysystem": "^1.3", + "php": ">=7.0.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "mockery/mockery": "^1.3", + "orchestra/testbench": "^5.20", + "phpstan/phpstan": "^0.12.99", + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "AlphaSnow\\AliyunOss\\ServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "AlphaSnow\\AliyunOss\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "alphasnow", + "email": "wind91@foxmail.com" + } + ], + "description": "alibaba cloud object storage service for laravel", + "homepage": "https://alphasnow.github.io/aliyun-oss-laravel/", + "keywords": [ + "aliyun", + "filesystems", + "laravel", + "oss", + "storage" + ], + "support": { + "issues": "https://github.com/alphasnow/aliyun-oss-laravel/issues", + "source": "https://github.com/alphasnow/aliyun-oss-laravel/tree/3.0.2" + }, + "time": "2021-10-12T07:16:16+00:00" + }, { "name": "asm89/stack-cors", "version": "v2.0.3", @@ -193,6 +582,64 @@ ], "time": "2021-08-15T20:50:18+00:00" }, + { + "name": "clagiordano/weblibs-configmanager", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/clagiordano/weblibs-configmanager.git", + "reference": "5c8ebcc62782313b1278afe802b120d18c07a059" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clagiordano/weblibs-configmanager/zipball/5c8ebcc62782313b1278afe802b120d18c07a059", + "reference": "5c8ebcc62782313b1278afe802b120d18c07a059", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "clagiordano/phpunit-result-printer": "^1", + "phpunit/phpunit": "^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "clagiordano\\weblibs\\configmanager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Claudio Giordano", + "email": "claudio.giordano@autistici.org", + "role": "Developer" + } + ], + "description": "weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object", + "keywords": [ + "clagiordano", + "configuration", + "manager", + "tool", + "weblibs" + ], + "support": { + "issues": "https://github.com/clagiordano/weblibs-configmanager/issues", + "source": "https://github.com/clagiordano/weblibs-configmanager/tree/v1.2.0" + }, + "time": "2021-05-18T17:55:57+00:00" + }, { "name": "composer/package-versions-deprecated", "version": "1.11.99.4", @@ -272,6 +719,72 @@ ], "time": "2021-09-13T08:41:34+00:00" }, + { + "name": "danielstjules/stringy", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/danielstjules/Stringy.git", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Stringy\\": "src/" + }, + "files": [ + "src/Create.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel St. Jules", + "email": "danielst.jules@gmail.com", + "homepage": "http://www.danielstjules.com" + } + ], + "description": "A string manipulation library with multibyte support", + "homepage": "https://github.com/danielstjules/Stringy", + "keywords": [ + "UTF", + "helpers", + "manipulation", + "methods", + "multibyte", + "string", + "utf-8", + "utility", + "utils" + ], + "support": { + "issues": "https://github.com/danielstjules/Stringy/issues", + "source": "https://github.com/danielstjules/Stringy" + }, + "time": "2017-06-12T01:10:27+00:00" + }, { "name": "dasprid/enum", "version": "1.0.3", @@ -2705,6 +3218,73 @@ ], "time": "2021-10-01T21:08:31+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb", + "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.4 || ^7.0 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" + }, + "require-dev": { + "composer/xdebug-handler": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^7.5.15" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "support": { + "issues": "https://github.com/jmespath/jmespath.php/issues", + "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1" + }, + "time": "2021-06-14T00:11:39+00:00" + }, { "name": "nesbot/carbon", "version": "2.55.2", diff --git a/config/settings.php b/config/settings.php index 8f9d1ca7..c6792bf1 100644 --- a/config/settings.php +++ b/config/settings.php @@ -4,6 +4,15 @@ return [ // 应用名称 'app_name' => '子春生', + //阿里云OSS信息 + 'aliyun_oss_access_id' => 'LTAI5tFMaynxgZ9aDMNLxpU9', + 'aliyun_oss_access_key' => 'pecJA3LX2sQyWxWDMUUb5NhsMe4Czu', + 'aliyun_oss_bucket' => 'zcs-mall', + 'aliyun_oss_endpoint' => 'oss-cn-chengdu.aliyuncs.com', + 'aliyun_oss_domain' => 'cdn.zichunsheng.cn', + 'aliyun_oss_use_ssl' => true, + 'aliyun_oss_sts_arn' => 'acs:ram::1367535826984495:role/ossstsrole', + // 订单支付过期时间(秒) 'order_payment_expires_at' => 1800,