ox01code / omise
this is a packge of omise
Installs: 105
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 5
Open Issues: 0
Type:package
Requires
- php: ^7.2.5
- guzzlehttp/guzzle: ~6.0
This package is auto-updated.
Last update: 2025-04-28 17:55:19 UTC
README
Docs
เริ่มต้นใช้งานของ omise
ตัวอย่างโค้ด
Support
Laravel | Version |
---|---|
7 | 2.0.0 |
Let's Start
โหลดผ่าน composer
composer require ox01code/omise
นำไฟล์ config มาไว้ที่โปรเจค
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);