Installation


Step 1 - Download the helloPay SDK from our Github:
https://github.com/hellopay/hellopay-php-sdk
You can also clone the repository (git clone https://github.com/hellopay/hellopay-php-sdk.git) or use Composer to install it("readMe" file for more information).

Step 2 - The ‘src’ folder includes the php library to make the integration easier for the merchants. You don’t have to study or even open it, just put it in the main folder of your shop’s source code. Basically, you could put it where ever you want on your website, you just have to adjust the file path later in your source code to be able to use it.

Step 3 - Put this lines of code in the beginning of every PHP file in which you want to use the functions of the helloPay library (every PHP, that communicates with helloPay).

<?php

require_once __DIR__ . '/src/HelloPay/autoload.php';

$helloPay = new \HelloPay\HelloPay([
  'shopConfig' => 'AAEAAADoKU7YCxb_Z9IUuzGjLJ/AAEAAAgfi0MqrhIjAnG4RiaKAar/a5c416d9f64764e1',
  'apiUrl' => 'https://sandbox.hellopay.com.sg',
  'sslEnabled' => true
]);
<?php

require_once __DIR__ . '';

$helloPay = new \HelloPay\HelloPay([
  'shopConfig' => '',
  'apiUrl' => '',
  'sslEnabled' => true
]);

Code Description


 

Autoload.php

“/src/HelloPay/autoload.php” - If you put the src folder inside of your main folder of your Website, you just can copy this lines. However, if you put it somewhere else, you have to adjust the path.

ShopConfig

Your ShopConfig is your API Key, you can find it in your account settings of your sandbox merchant account. If you don’t have an API key yet, no sandbox account or you can’t even access the sandbox, please write an email to [email protected], we will take care to get you ready for the integration!

API Url

If you’re not in Singapore change the ‘apiUrl’ from ‘https://sandbox.hellopay.com.sg’ to the right url for your location (example: ‘https://sandbox.hellopay.com.ph’ for the Philippines).

SSL Enabled

If you have done the integration and it does not work, please try to change ‘sslEnabled’ to false (‘sslEnabled’ => false). Does it work now? That means your website has no SSL certificate and so helloPay rejected you because of safety reasons. Turning the SSL Certificate check off is not a permanent solution! This solution is sufficient to integrate with the sandbox and testing everything, but before going live please get a SSL Certificate for your shop and turn it back on again.

Simply Better Online Payment