Skip to content

Commit

Permalink
Changed '' to ''
Browse files Browse the repository at this point in the history
  • Loading branch information
condor2 committed Jan 10, 2024
1 parent f3f67cf commit 23af59c
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 40 deletions.
8 changes: 4 additions & 4 deletions upload/catalog/model/extension/payment/amazon_login_pay.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ public function updateCaptureStatus($amazon_login_pay_order_id, $status) {

public function getOrder($order_id) {

$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "amazon_login_pay_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "amazon_login_pay_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");

if ($qry->num_rows) {
$order = $qry->row;
$order['transactions'] = $this->getTransactions($order['amazon_login_pay_order_id'], $qry->row['currency_code']);
if ($query->num_rows) {
$order = $query->row;
$order['transactions'] = $this->getTransactions($order['amazon_login_pay_order_id'], $query->row['currency_code']);

return $order;
} else {
Expand Down
12 changes: 6 additions & 6 deletions upload/catalog/model/extension/payment/bluepay_redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ public function addOrder($order_info, $response_data) {
}

public function getOrder($order_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "bluepay_redirect_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "bluepay_redirect_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");

if ($qry->num_rows) {
$order = $qry->row;
if ($query->num_rows) {
$order = $query->row;
$order['transactions'] = $this->getTransactions($order['bluepay_redirect_order_id']);

return $order;
Expand All @@ -86,10 +86,10 @@ public function addTransaction($bluepay_redirect_order_id, $type, $order_info) {
}

private function getTransactions($bluepay_redirect_order_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "bluepay_redirect_order_transaction` WHERE `bluepay_redirect_order_id` = '" . (int)$bluepay_redirect_order_id . "'");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "bluepay_redirect_order_transaction` WHERE `bluepay_redirect_order_id` = '" . (int)$bluepay_redirect_order_id . "'");

if ($qry->num_rows) {
return $qry->rows;
if ($query->num_rows) {
return $query->rows;
} else {
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions upload/catalog/model/extension/payment/g2apay.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public function addTransaction($g2apay_order_id, $type, $order_info) {
}

public function getG2aOrder($order_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "g2apay_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "g2apay_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");

if ($qry->num_rows) {
return $qry->row;
if ($query->num_rows) {
return $query->row;
} else {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/model/extension/payment/opayo.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ private function updateRecurringOrder($order_recurring_id, $next_payment) {
}

private function getRecurringOrder($order_recurring_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "opayo_order_recurring` WHERE `order_recurring_id` = '" . (int)$order_recurring_id . "'");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "opayo_order_recurring` WHERE `order_recurring_id` = '" . (int)$order_recurring_id . "'");

return $qry->row;
return $query->row;
}

private function addRecurringTransaction($order_recurring_id, $response_data, $type) {
Expand Down
14 changes: 7 additions & 7 deletions upload/catalog/model/extension/payment/pp_express.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,22 +229,22 @@ public function paymentRequestInfo() {
}

public function getTotalCaptured($paypal_order_id) {
$qry = $this->db->query("SELECT SUM(`amount`) AS `amount` FROM `" . DB_PREFIX . "paypal_order_transaction` WHERE `paypal_order_id` = '" . (int)$paypal_order_id . "' AND `pending_reason` != 'authorization' AND `pending_reason` != 'paymentreview' AND (`payment_status` = 'Partially-Refunded' OR `payment_status` = 'Completed' OR `payment_status` = 'Pending') AND `transaction_entity` = 'payment'");
$query = $this->db->query("SELECT SUM(`amount`) AS `amount` FROM `" . DB_PREFIX . "paypal_order_transaction` WHERE `paypal_order_id` = '" . (int)$paypal_order_id . "' AND `pending_reason` != 'authorization' AND `pending_reason` != 'paymentreview' AND (`payment_status` = 'Partially-Refunded' OR `payment_status` = 'Completed' OR `payment_status` = 'Pending') AND `transaction_entity` = 'payment'");

return $qry->row['amount'];
return $query->row['amount'];
}

public function getTotalRefunded($paypal_order_id) {
$qry = $this->db->query("SELECT SUM(`amount`) AS `amount` FROM `" . DB_PREFIX . "paypal_order_transaction` WHERE `paypal_order_id` = '" . (int)$paypal_order_id . "' AND `payment_status` = 'Refunded'");
$query = $this->db->query("SELECT SUM(`amount`) AS `amount` FROM `" . DB_PREFIX . "paypal_order_transaction` WHERE `paypal_order_id` = '" . (int)$paypal_order_id . "' AND `payment_status` = 'Refunded'");

return $qry->row['amount'];
return $query->row['amount'];
}

public function getTransactionRow($transaction_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "paypal_order_transaction` `pt` LEFT JOIN `" . DB_PREFIX . "paypal_order` `po` ON `pt`.`paypal_order_id` = `po`.`paypal_order_id` WHERE `pt`.`transaction_id` = '" . $this->db->escape($transaction_id) . "' LIMIT 1");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "paypal_order_transaction` `pt` LEFT JOIN `" . DB_PREFIX . "paypal_order` `po` ON `pt`.`paypal_order_id` = `po`.`paypal_order_id` WHERE `pt`.`transaction_id` = '" . $this->db->escape($transaction_id) . "' LIMIT 1");

if ($qry->num_rows > 0) {
return $qry->row;
if ($query->num_rows > 0) {
return $query->row;
} else {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/model/extension/payment/securetrading_pp.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public function getMethod($address, $total) {
}

public function getOrder($order_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "securetrading_pp_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "securetrading_pp_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");

return $qry->row;
return $query->row;
}

public function editOrder($order_id, $order) {
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/model/extension/payment/securetrading_ws.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public function call($data) {
}

public function getOrder($order_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "securetrading_ws_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "securetrading_ws_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");

return $qry->row;
return $query->row;
}

public function addMd($order_id, $md) {
Expand Down
28 changes: 14 additions & 14 deletions upload/catalog/model/extension/payment/worldpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public function addOrder($order_info, $order_code) {
}

public function getOrder($order_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "worldpay_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "worldpay_order` WHERE `order_id` = '" . (int)$order_id . "' LIMIT 1");

if ($qry->num_rows) {
$order = $qry->row;
if ($query->num_rows) {
$order = $query->row;
$order['transactions'] = $this->getTransactions($order['worldpay_order_id']);

Check failure on line 79 in upload/catalog/model/extension/payment/worldpay.php

View workflow job for this annotation

GitHub Actions / tests (8.3)

Method ModelExtensionPaymentWorldpay::getTransactions() invoked with 1 parameter, 2 required.

return $order;
Expand All @@ -89,10 +89,10 @@ public function addTransaction($worldpay_order_id, $type, $order_info) {
}

public function getTransactions($worldpay_order_id) {
$qry = $this->db->query("SELECT * FROM `" . DB_PREFIX . "worldpay_order_transaction` WHERE `worldpay_order_id` = '" . (int)$worldpay_order_id . "'");
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "worldpay_order_transaction` WHERE `worldpay_order_id` = '" . (int)$worldpay_order_id . "'");

if ($qry->num_rows) {
return $qry->rows;
if ($query->num_rows) {
return $query->rows;
} else {
return false;
}
Expand Down Expand Up @@ -287,9 +287,9 @@ private function updateRecurringOrder($order_recurring_id, $next_payment) {
}

private function getRecurringOrder($order_recurring_id) {
$qry = $this->db->query("SELECT * FROM " . DB_PREFIX . "worldpay_order_recurring WHERE order_recurring_id = '" . (int)$order_recurring_id . "'");
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "worldpay_order_recurring WHERE order_recurring_id = '" . (int)$order_recurring_id . "'");

return $qry->row;
return $query->row;
}

private function addProfileTransaction($order_recurring_id, $order_code, $price, $type) {
Expand All @@ -303,27 +303,27 @@ private function getProfiles() {
JOIN `" . DB_PREFIX . "order` `o` USING(`order_id`)
WHERE o.payment_code = 'worldpay'";

$qry = $this->db->query($sql);
$query = $this->db->query($sql);

$order_recurring = [];

foreach ($qry->rows as $profile) {
foreach ($query->rows as $profile) {
$order_recurring[] = $this->getProfile($profile['order_recurring_id']);
}

return $order_recurring;
}

private function getProfile($order_recurring_id) {
$qry = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_recurring WHERE order_recurring_id = " . (int)$order_recurring_id);
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_recurring WHERE order_recurring_id = " . (int)$order_recurring_id);

return $qry->row;
return $query->row;
}

public function getWorldpayOrder($worldpay_order_id) {
$qry = $this->db->query("SELECT * FROM " . DB_PREFIX . "worldpay_order WHERE order_code = " . (int)$worldpay_order_id);
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "worldpay_order WHERE order_code = " . (int)$worldpay_order_id);

return $qry->row;
return $query->row;
}

public function updateCronJobRunTime() {
Expand Down

0 comments on commit 23af59c

Please sign in to comment.