-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49f0529
commit 76fef16
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License (AFL 3.0) | ||
* It is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/afl-3.0.php | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this file | ||
* | ||
* @author Buckaroo.nl <[email protected]> | ||
* @copyright Copyright (c) Buckaroo B.V. | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
use Buckaroo\PrestaShop\Src\Config\Config; | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
exit; | ||
} | ||
|
||
/** | ||
* @return mixed | ||
* @throws Exception | ||
*/ | ||
function upgrade_module_4_4_0($object) | ||
{ | ||
$blikData = [ | ||
'name' => 'blik', | ||
'label' => 'Blik', | ||
'icon' => 'Blik.svg', | ||
'template' => '', | ||
'is_payment_method' => '1', | ||
]; | ||
|
||
$keys = array_keys($blikData); | ||
$values = array_map(function ($value) { | ||
return pSQL($value); | ||
}, array_values($blikData)); | ||
|
||
$insertQuery = 'INSERT INTO ' . _DB_PREFIX_ . 'bk_payment_methods (' . implode(', ', $keys) . ') VALUES ("' . implode('", "', $values) . '")'; | ||
Db::getInstance()->execute($insertQuery); | ||
return true; | ||
} |