uawdijnntqw1x1x1
IP : 3.22.42.92
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
public_html
/
..
/
.trash
/
.
/
catalog.2
/
model
/
extension
/
credit_card
/
squareup.php
/
/
<?php class ModelExtensionCreditCardSquareup extends Model { public function addCustomer($data) { $this->db->query("INSERT INTO `" . DB_PREFIX . "squareup_customer` SET customer_id='" . (int)$data['customer_id'] . "', sandbox='" . (int)$data['sandbox'] . "', square_customer_id='" . $this->db->escape($data['square_customer_id']) . "'"); } public function getCustomer($customer_id, $sandbox) { return $this->db->query("SELECT * FROM `" . DB_PREFIX . "squareup_customer` WHERE customer_id = '" . (int)$customer_id . "' AND sandbox='" . (int)$sandbox . "'")->row; } public function addCard($customer_id, $sandbox, $data) { $this->db->query("INSERT INTO `" . DB_PREFIX . "squareup_token` SET customer_id='" . (int)$customer_id . "', sandbox='" . (int)$sandbox . "', token='" . $this->db->escape($data['id']) . "', brand='" . $this->db->escape($data['card_brand']) . "', ends_in='" . (int)$data['last_4'] . "', date_added=NOW()"); } public function getCard($squareup_token_id) { return $this->db->query("SELECT * FROM `" . DB_PREFIX . "squareup_token` WHERE squareup_token_id='" . (int)$squareup_token_id . "'")->row; } public function getCards($customer_id, $sandbox) { return $this->db->query("SELECT * FROM `" . DB_PREFIX . "squareup_token` WHERE customer_id='" . (int)$customer_id . "' AND sandbox='" . (int)$sandbox . "'")->rows; } public function cardExists($customer_id, $data) { return $this->db->query("SELECT * FROM `" . DB_PREFIX . "squareup_token` WHERE customer_id='" . (int)$customer_id . "' AND brand='" . $this->db->escape($data['card_brand']) . "' AND ends_in='" . (int)$data['last_4'] . "'")->num_rows > 0; } public function verifyCardCustomer($squareup_token_id, $customer_id) { return $this->db->query("SELECT * FROM `" . DB_PREFIX . "squareup_token` WHERE squareup_token_id='" . (int)$squareup_token_id . "' AND customer_id='" . (int)$customer_id . "'")->num_rows > 0; } public function deleteCard($squareup_token_id) { $this->db->query("DELETE FROM `" . DB_PREFIX . "squareup_token` WHERE squareup_token_id='" . (int)$squareup_token_id . "'"); } }
/home/sudancam/public_html/../.trash/./catalog.2/model/extension/credit_card/squareup.php