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

dev-master 2022-09-04 15:55 UTC

This package is auto-updated.

Last update: 2024-05-04 19:53:46 UTC


README

一款针对海外虚拟产品,定制需求的支付方式

Test Status Lint Status Latest Stable Version Latest Unstable Version Total Downloads License

安装

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);