Skip to content

Commit 8bdb1cc

Browse files
authored
Merge pull request #86 from p-maguire/5.0-dev
SP-983: Replace deprecated sql query
2 parents 5895088 + 50d049e commit 8bdb1cc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

modules/gateways/bitpaycheckout/callback/bitpaycheckout_ipn.php

+8-7
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ function checkInvoiceStatus($url) {
6565
$orderid = checkCbInvoiceID($invoiceStatus->data->orderId, 'bitpaycheckout');
6666
$price = $invoiceStatus->data->price;
6767
#first see if the ipn matches
68-
#get the user id first
69-
$table = "_bitpay_checkout_transactions";
70-
$fields = "order_id,transaction_id,transaction_status";
71-
$where = array("order_id" => $orderid,"transaction_id" => $order_invoice);
72-
73-
$result = select_query($table, $fields, $where);
74-
$rowdata = mysql_fetch_array($result);
68+
$trans_data = Capsule::table('_bitpay_checkout_transactions')
69+
->select('order_id', 'transaction_id', 'transaction_status')
70+
->where([
71+
['order_id', '=', $orderid],
72+
['transaction_id', '=', $order_invoice],
73+
])
74+
->get();
75+
$rowdata = (array) $trans_data[0];
7576
$btn_id = $rowdata['transaction_id'];
7677
$transaction_status = $rowdata['transaction_status'];
7778

0 commit comments

Comments
 (0)