soap/treasurer is a Laravel package for laravel integration for omise payment service.
It currently has 0 GitHub stars and 1 downloads on Packagist (latest version v0.0.3).
Install it with composer require soap/treasurer.
Discover more Laravel packages by soap
or browse all Laravel packages to compare alternatives.
Last updated
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
You can install the package via composer:
composer require soap/treasurer
You can publish and run the migrations with:
php artisan vendor:publish --tag="treasurer-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="treasurer-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="treasurer-views"
This is the contents of the published config file:
return [
'url' => 'https://api.omise.co',
'live_public_key' => env('OMISE_LIVE_PUBLIC_KEY', ''),
'live_secret_key' => env('OMISE_LIVE_SECRET_KEY', ''),
'test_public_key' => env('OMISE_TEST_PUBLIC_KEY', ''),
'test_secret_key' => env('OMISE_TEST_SECRET_KEY', ''),
'api_version' => env('OMISE_API_VERSION', '2019-05-29'),
'sanbox_status' => env('OMISE_SANDBOX_STATUS', true),
];
Firstly, you have to register for OMISE payment service. Then fill in your keys in .env file.
You can retreive Public key or Secret key like this (it will provide LIVE or TEST key depending on your configuration.)
$treasurer = app(\Soap\Treasurer\Treasure::class);
$publicKey = $treasurer->getPublicKey();
$secretKey = $treasurer->getSecretKey();
When you make a call to each API call, the object will have access to response array using $object->$key or $object->$key(). These keys are provided in response API array by Omise. For example Charge API response array will be:
#_values => [
'object' => 'charge',
'id' => 'chrg_tes_6131313133131344',
'amount' => 2000,
'fee_vat' => 51,
...
];
Then you can get them like this:
$charge->amount(); // $charge->amount;
$charg->feeVat(); // $charge->fee_vat;
For each of Omise wrapper class, you can call without worry about Public key and Secret key. And the package (early version) provides an ease way to get return values from Omise like above.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.