Download the PHP package omise/omise-php without Composer

On this page you can find all versions of the php package omise/omise-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package omise-php

Omise PHP Client

omise-php is a library designed specifically to connect with Omise API written in PHP.

Requirements

Note that, due to the PHP END OF LIFE cycle, we encourage you to run Omise-PHP library on a PHP version 7.4 or higher as there is no longer security support for any below 7.4 and that could cause you any security vulnerable issues in the future.

Installation

Using Composer

You can install the library via Composer. If you don't already have Composer installed, first install it by following one of these instructions depends on your OS of choice:

  1. After composer is installed, you can declare Omise-PHP as a project dependency by creating a composer.json at the root of your project directory with the following content:

  2. Then run the following command to install the Omise-PHP library:

  3. Once you run the composer install command, the Composer will generate a vendor folder at the same directory as composer.json. Now you can then add the following line to PHP script to load the library:

  4. Now you are ready to start using the library, please see the configuration and quick start sections below for usage examples.

Manually

If you're not using Composer, you can also download the latest version of Omise-PHP. Then, follows the instruction below to install Omise-PHP to the project.

  1. Extract the library to your project.

  2. Then, include the following line into your PHP file,

  3. Now you are ready to start using the library, please see the configuration and quick start sections below for usage examples.

However, using Composer is recommended as you can easily keep the library up-to-date.

Configuration

• Config your public and secret keys

First thing first, before you make a very first request to Omise API, you will need to configure your public key and secret key (these can be found at the Omise Dashboard. Log in then go to Keys from the sidebar menu).

Place the following code next to a line where Omise-PHP library is loaded.

configuring omise-php, public and secret keys

Reference: https://www.omise.co/api-authentication.

• API version

In case you want to enforce API version the application use, you can specify it by defining the OMISE_API_VERSION.
The version specified by this settings will override the version setting in your account. This is useful if you have multiple environments with different API versions (e.g. development on the latest but production on the older version).

API version can be found at Omise Dashboard. Log in then go to API versions from the top-right menu.

configuring omise-php, API version

It is highly recommended to set OMISE_API_VERSION to the current version that you're using to prevent any trouble from accidentally click update Omise-API version at the dashboard.

Quick Start

From the above sections, your code will look similar like the following code:

Now, let's add the below code to retrieve your account information:

And that's it! You have just made a request to Omise API, easy huh?

Now you are free from our instruction :D
Feel free to integrate Omise Payment Gateway service anyway you like to make it fit with your business flow.
Also, stop by documents or example code sometime to get more informations if you need any helps.

Have fun!

Development and Testing

To run an automated test suite, make sure you already have a PHPUnit in your local machine. Then run the PHPUnit:

Contributing

Thanks for your interest in contributing to Omise PHP. We're looking forward to hearing your thoughts and willing to review your changes.

The following subjects are instructions for contributors who consider to submit changes and/or issues.

Submit the changes

You're all welcome to submit a pull request. Please consider the pull request template and fill the form when you submit a new pull request.

Learn more about submitting pull request here: https://help.github.com/articles/about-pull-requests

Submit the issue

Submit the issue through GitHub's issue channel.

Learn more about submitting an issue here: https://guides.github.com/features/issues

License

Omise-PHP is open-sourced software released under the MIT License.


All versions of omise-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package omise/omise-php contains the following files

Loading the files please wait ....