Skip to content

Commit

Permalink
Update monero.php
Browse files Browse the repository at this point in the history
  • Loading branch information
serhack authored Mar 28, 2018
1 parent c964739 commit 8565cc2
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions admin/model/extension/payment/monero.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<?php

class ModelExtensionPaymentMonero extends Model {

public function install(){
$this->db->query("
CREATE TABLE `" . DB_PREFIX . "order_monero` (
`order_id` int(11) NOT NULL,
`payment_id` varchar(255) NOT NULL,
PRIMARY KEY `order_id` (`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
");
}

public function uninstall(){
$this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "order_monero`;");
}

class ModelExtensionPaymentMonero extends Model
{
public function createDatabaseTables()
{
$sql = "CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "monero_opencart` (
`bind_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`order_id` int(32) NOT NULL,
`session_id` varchar(32) NOT NULL,
`status` varchar(32)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$this->db->query($sql);
}
public function dropDatabaseTables()
{
$sql = "DROP TABLE IF EXISTS `" . DB_PREFIX . "monero_opencart`;";
$this->db->query($sql);
}
}

?>

0 comments on commit 8565cc2

Please sign in to comment.