1. Adding Your Payment Account to the Database
Payment systems generally work with API keys ( "public_key" and "secret_key" ). These key names may be different for some systems, but logically work the same way.
To add a new payment system, open the "payment_gateways" table in your database via phpMyAdmin and click the "Insert" link from the menu above to add your payment system.
Field | Description |
---|
id | Leave this field blank because the id is automatically generated. |
name | Enter your payment system name.
|
name_key | Enter an unique name that does not contain special characters for your payment system.
|
public_key | Enter the public_key value you created in your payment account. Example: Adt9g4b-sz6NaQ_dsXGZQ76ah... |
secret_key | Enter the secret_key value you created in your payment account. Example: EL6tE3pLtJ13JebQI5n3Fy57xL7... |
environment | This is the payment mode option offered by your payment system. If you want to add test API keys for your payment system and perform payment tests, you must enter "sandbox" here. If you want to enter your live API keys and receive payments after tests, you must enter "production". Example: sandbox |
base_currency | If you want to accept payments in only one currency, you can write the short name of the currency here. If you want to receive payments in all active currencies on your site, you can enter "all" here. You can check the "currencies" table in your database for the short names of all currencies available in the system. Example: USD
|
status | 1 or 0. If you do not want the payment system to appear on your site, you need to enter 0. Otherwise, you need to enter 1. Example: 1 |
logos | Our script displays logos for each payment system on the payment methods page. These logos are located in the "assets / img / payment" folder. For the payment system you add, you can add the logo names you want to show by putting commas between them. You can upload your own SVG logos to this folder. Example: visa,mastercard,amex,discover |
You can follow these steps to add a static page to your site. "static_page" name will be used as an example, but you can change this name as you want.
1. Open "app/Controllers/HomeController.php" file and add your function:
public function staticPage()
{
$data['title'] = "This is a static page";
$data['description'] = "This is a static page";
$data['keywords'] = "static,page";
echo view('partials/_header', $data);
echo view('static_page', $data);
echo view('partials/_footer');
}
2. Create a "static_page.php" file in the "app/Views" folder. You need to add your HTML and CSS codes to this file.
3. Open the "app/Config/Routes.php" file to create a route for your page. You can add the following line just after "$routes->get('/', 'HomeController::index');" line in this file:
$routes->get('/static-page', 'HomeController::staticPage');
After these edits, you can access this page with "domain.com/static-page" URL.
If PayPal is not working on your site, please follow these steps:
1. You need to create PayPal API keys with your PayPal "business" account. Your account should allow these kind of payments. After genereting your API keys, you need to enter your API keys from the "Payment Settings" section in the Admin panel.
2. If you want to test the payment system with sandbox API keys, you need to select "Sandbox" mode in the "Payment Settings" section. If you want to add live API keys and receive the payments, you need to select "Production" mode.
3. PayPal does not work with all currencies. If you add a product with a currency that PayPal does not support, the payment window will not open. You need to use one of these currencies:
Currency | Code |
---|
Australian dollar | AUD |
Brazilian real 2 | BRL |
Canadian dollar | CAD |
Chinese Renmenbi 4 | CNY |
Czech koruna | CZK |
Danish krone | DKK |
Euro | EUR |
Hong Kong dollar | HKD |
Hungarian forint 1 | HUF |
Indian rupee 3 | INR |
|
Israeli new shekel | ILS |
Japanese yen 1 | JPY |
Malaysian ringgit 4 | MYR |
Mexican peso | MXN |
New Taiwan dollar 1 | TWD |
New Zealand dollar | NZD |
Norwegian krone | NOK |
Philippine peso | PHP |
Polish złoty | PLN |
Pound sterling | GBP |
Russian ruble | RUB |
Singapore dollar | SGD |
Swedish krona | SEK |
Swiss franc | CHF |
Thai baht | THB |
United States dollar | USD |