Download the PHP package pkomjit/omise-php without Composer
On this page you can find all versions of the php package pkomjit/omise-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package omise-php
Omise PHP SDK
A PHP SDK for Omise payment gateway integration. Supports both standalone PHP and Laravel applications.
Unofficial package. This is a community-maintained SDK and is not affiliated with or endorsed by Omise / Opn Payments. For the official library see omise/omise-php.
Features
- PHP 8.3+ support
- Works with or without Laravel
- Multiple payment methods (Credit Card, PromptPay, TrueMoney, Rabbit LINE Pay, Direct Debit, Mobile Banking, ShopeePay)
- Multi-currency support (THB, USD, EUR, GBP, JPY, SGD, and more)
- Token, Customer, Charge, Source, and Event APIs
- 3D Secure authentication support
- Webhook signature verification
- Type-safe with full IDE support
Supported Payment Methods
| Payment Method | Type | Country | Currency | Limits | Docs |
|---|---|---|---|---|---|
| Credit Card | Card/3DS | Multi | Multi | Varies | docs/credit-card.md |
| PromptPay | QR Code | Thailand | THB | 20 - 150,000 THB | docs/promptpay.md |
| Rabbit LINE Pay | Redirect | Thailand | THB | 20 - 150,000 THB | docs/rabbit-linepay.md |
| Direct Debit | Bank Link | Thailand | THB | 20 - 150,000 THB | docs/direct-debit.md |
| Mobile Banking | App Redirect | Thailand/Singapore | THB/SGD | Varies by bank | docs/mobile-banking.md |
| ShopeePay QR | Redirect | Thailand/Singapore/Malaysia | THB/SGD/MYR | Varies by country | docs/shopeepay-qr.md |
| ShopeePay App | App Redirect | Thailand/Singapore/Malaysia | THB/SGD/MYR | Varies by country | docs/shopeepay-jumpapp.md |
| TrueMoney QR | QR Code | Thailand | THB | 100 - 50,000 THB | docs/truemoney-qr.md |
| TrueMoney App | App Redirect | Thailand | THB | 100 - 50,000 THB | docs/truemoney-jumpapp.md |
Supported Currencies (Multi-Currency)
| Currency | Country | Limits (min - max) |
|---|---|---|
| THB | Thailand | 20 - 150,000 |
| USD | USA | 1 - 50,000 |
| EUR | Europe | 1 - 50,000 |
| GBP | UK | 1 - 50,000 |
| JPY | Japan | 100 - 6,000,000 |
| SGD | Singapore | 1 - 20,000 |
| MYR | Malaysia | 1 - 30,000 |
| AUD | Australia | 1 - 50,000 |
| CAD | Canada | 1 - 50,000 |
| HKD | Hong Kong | 1 - 500,000 |
Note: Multi-currency requires activation. Contact [email protected] to enable.
Supported Banks
Internet Banking / Mobile Banking
| Bank | Code | Type |
|---|---|---|
| Bank of Ayudhya (Krungsri) | bay |
Internet/Mobile |
| Bangkok Bank | bbl |
Internet/Mobile |
| Krungthai Bank | ktb |
Internet/Mobile |
| Siam Commercial Bank | scb |
Internet/Mobile |
| Kasikorn Bank | kbank |
Mobile only |
Direct Debit
| Bank | Code |
|---|---|
| Bank of Ayudhya (Krungsri) | direct_debit_bay |
| Kasikorn Bank | direct_debit_kbank |
| Krungthai Bank | direct_debit_ktb |
| Siam Commercial Bank | direct_debit_scb |
Mobile Banking
| Bank | Code | Country |
|---|---|---|
| Bangkok Bank (Bualuang mBanking) | mobile_banking_bbl |
Thailand |
| Kasikorn Bank (K PLUS) | mobile_banking_kbank |
Thailand |
| Krungthai Bank (KTB NEXT) | mobile_banking_ktb |
Thailand |
| Bank of Ayudhya (KMA) | mobile_banking_bay |
Thailand |
| Siam Commercial Bank (SCB Easy) | mobile_banking_scb |
Thailand |
| OCBC Digital | mobile_banking_ocbc |
Singapore |
Installation
Quick Start
Standalone PHP
Laravel
-
Publish the configuration:
-
Add your API keys to
.env: - Use the facade:
Or use dependency injection:
Payment Method Documentation
For detailed usage of each payment method, see the documentation in the docs/ folder:
- Credit Card - Card payments with 3D Secure and multi-currency
- PromptPay - Thailand's national QR payment system
- Rabbit LINE Pay - LINE app wallet payments
- Direct Debit - Bank account linking for recurring payments
- Mobile Banking - Bank app redirect payments (Thailand/Singapore)
- ShopeePay QR - ShopeePay QR code payments (Thailand/Singapore/Malaysia)
- ShopeePay App - ShopeePay app redirect payments (Thailand/Singapore/Malaysia)
- TrueMoney QR - TrueMoney QR code payments
- TrueMoney App - TrueMoney app redirect payments
Charge API
Source API
Event API
Webhook Handling
Basic Usage
Laravel Webhook Controller
Webhook Events
Common webhook events you can listen for:
charge.create- Charge createdcharge.complete- Charge completed (successful or failed)charge.expire- Charge expiredrefund.create- Refund createddispute.create- Dispute created
Configuration Options
Environment Variables
The SDK can read from environment variables:
Expected variables:
OMISE_PUBLIC_KEYOMISE_SECRET_KEYOMISE_WEBHOOK_SECRET(required for webhooks; without itwebhooks()->handle()rejects every payload)OMISE_MODE(optional, default: 'live')OMISE_DEFAULT_CURRENCY(optional, default: 'THB')
Error Handling
Testing
Test Mode
Use test keys (prefixed with _test_) for development:
Running Tests
API Reference
Omise (Main Class)
| Method | Description |
|---|---|
charges() |
Get Charge API |
sources() |
Get Source API |
events() |
Get Event API |
tokens() |
Get Token API |
customers() |
Get Customer API |
linkedAccounts() |
Get LinkedAccount API |
promptPay() |
Get PromptPay payment method |
rabbitLinePay() |
Get Rabbit LINE Pay payment method |
creditCard() |
Get Credit Card payment method |
directDebit() |
Get Direct Debit payment method |
truemoneyQR() |
Get TrueMoney QR payment method |
truemoneyJumpApp() |
Get TrueMoney Jump App payment method |
mobileBanking() |
Get Mobile Banking payment method |
shopeepayQR() |
Get ShopeePay QR payment method |
shopeepayJumpApp() |
Get ShopeePay Jump App payment method |
webhooks() |
Get webhook handler |
payWithPromptPay($amount, $webhooks) |
Quick PromptPay payment |
payWithRabbitLinePay($amount, $returnUri, $webhooks) |
Quick Rabbit LINE Pay payment |
payWithCard($tokenId, $amount, $currency, $returnUri) |
Quick credit card payment |
payWithTruemoneyQR($amount, $webhooks) |
Quick TrueMoney QR payment |
payWithTruemoneyJumpApp($amount, $returnUri, $webhooks) |
Quick TrueMoney App payment |
payWithMobileBanking($bankType, $amount, $returnUri, $options) |
Quick Mobile Banking payment |
payWithShopeepayQR($amount, $currency, $returnUri, $webhooks) |
Quick ShopeePay QR payment |
payWithShopeepayJumpApp($amount, $currency, $returnUri, $options) |
Quick ShopeePay App payment |
getCharge($id) |
Retrieve a charge |
getEvent($id) |
Retrieve an event |
getCustomer($id) |
Retrieve a customer |
getDefaultCurrency() |
Get the default currency |
isTestMode() |
Check if in test mode |
isLiveMode() |
Check if in live mode |
Currency Helper
| Method | Description |
|---|---|
Currency::isSupported($currency) |
Check if currency is supported |
Currency::toSmallestUnit($amount, $currency) |
Convert to smallest unit |
Currency::toMainUnit($amount, $currency) |
Convert to main unit |
Currency::format($amount, $currency) |
Format with symbol |
Currency::getSymbol($currency) |
Get currency symbol |
Currency::getMinimumAmount($currency) |
Get minimum in smallest unit |
Currency::getMaximumAmount($currency) |
Get maximum in smallest unit |
Currency::validateAmount($amount, $currency) |
Validate amount limits |
License
MIT License. See LICENSE.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
All versions of omise-php with dependencies
guzzlehttp/guzzle Version ^7.0
psr/http-message Version ^1.0|^2.0
psr/log Version ^2.0|^3.0
ext-curl Version *