/Laravel-Omise

Packge For Omise

Primary LanguagePHPMIT LicenseMIT

Laravel-Omise

Total Downloads Monthly Downloads Daily Downloads License

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