⚠️ Disclaimer: I'm working with Omise. However, this repository is just one of my side projects and it's not an official example from Omise Payment Gateway. Please refer to https://www.omise.co/docs as an official document, or contact support@omise.co if you are interested in using Omise Payment Gateway.
- Either clone or download this project to your local machine.
- Extract files into your server.
- Execute
composer install
. - Enter the url of your server (i.e.
127.0.0.1
in my case).
- You will need to enter your Omise public key and secret key at
_config.php
file. Either at the line8-9
if you are using Omise-PHP version 2.x and below, or at the line16-17
for Omise-PHP version 3.x and above.
l8: // define('OMISE_PUBLIC_KEY', 'pkey'); // Config your Omise public key (Omise-PHP v2.x and below).
l9: // define('OMISE_SECRET_KEY', 'skey'); // Config your Omise secret key (Omise-PHP v2.x and below).
...
l16: // \Omise\Omise::setPublicKey('pkey'); // Config your Omise public key (Omise-PHP v3.x and above).
l17: // \Omise\Omise::setSecretKey('skey'); // Config your Omise secret key (Omise-PHP v3.x and above).
One last thing, you will need to set a correct path of your URL to this example
- At
_config.php
, line3
, just set your URL to this project there. For example, if you installed this project at your route folder, then it should behttp:://localhost
(orhttp:://127.0.0.1
).
Url::setBaseUrl('http://127.0.0.1');
And now, you should be ready to go ;)