康庐/omise

这是一个omise的包

1.0.1 2023-07-07 04:24 UTC

This package is auto-updated.

Last update: 2024-09-07 06:56:59 UTC


README

Total Downloads Monthly Downloads Daily Downloads License

文档

开始使用omise
代码示例

支持

开始吧

通过composer安装

composer require klongchu/omise

将配置文件放到项目中

php artisan vendor:publish --tag=config

在.env文件中设置参数

OMISE_PUBLIC_KEY=
OMISE_SECRET_KEY=

创建Source 阅读更多

$response = OmiseSource::create([
   'amount' => 12345,
   'currency' => 'THB',
   'type' => 'truemoney',
   'phone_number' => '0123456789',
]);
dd($response);

创建Charge 阅读更多

$response = OmiseCharge::create([
   'amount' => 12345,
   'currency' => 'THB',
   'return_uri' => 'http://example.com/orders/345678/complete',
   'source' => 'src_*****',
]);
dd($response);