szwtdl / easypay
payment paypal stripe paddle alipay wechat
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:libray
Requires
- php: >=8.1
- ext-bcmath: *
- ext-json: *
- ext-libxml: *
- ext-openssl: *
- ext-simplexml: *
- guzzlehttp/guzzle: ^7.5
- nesbot/carbon: ^2.62
- pimple/pimple: ^3.5
- psr/container: ^2.0
- stripe/stripe-php: ^9.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.10
- jetbrains/phpstorm-attributes: ^1.0
- mockery/mockery: ^1.4.4
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-05-04 19:53:46 UTC
README
一款针对海外虚拟
产品,定制需求
的支付方式
安装
composer require szwtdl/easypay:v1.0.0 -vvv
配置
use EasyPay\Factory; $config = [ 'client_id' => 'stripe_client_id', 'client_key' => 'stripe_client_key', 'return_url' => 'https://www.xxx.com', 'cancel_url' => 'https://www.xxx.com', 'mode' => 'test' ];
发起支付
$result = Factory::stripe($options)->pay([ 'title' => '黄金会员', 'total' => '100.00' ]); print_r($result);
同步通知
$result = Factory::stripe($options)->verify(); print_r($result);
异步通知
$result = Factory::stripe($options)->notify([ 'title' => '黄金会员', 'total' => '100.00' ]); print_r($result);
订单查询
$result = Factory::stripe($options)->query([ 'title' => '黄金会员', 'total' => '100.00' ]); print_r($result);
发起退款
$result = Factory::stripe($options)->refund([ 'title' => '黄金会员', 'total' => '100.00' ]); print_r($result);