You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1180,7 +1200,17 @@ public function allowCapture()
1180
1200
}
1181
1201
1182
1202
if ($blReturn) {
1183
-
$iCount = $this->_oFcpoDb->GetOne("SELECT COUNT(*) FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}'");
1203
+
$oDb = $this->_oFcpoHelper->fcpoGetPdoDb();
1204
+
1205
+
$sQuery = "
1206
+
SELECT COUNT(*)
1207
+
FROM fcpotransactionstatus
1208
+
WHERE fcpo_txid = :sTxid
1209
+
";
1210
+
$iCount = $oDb->fetchOne($sQuery, [
1211
+
'sTxid' => $this->oxorder__fcpotxid->value
1212
+
]);
1213
+
1184
1214
$blReturn = ($iCount == 0) ? false : true;
1185
1215
}
1186
1216
@@ -1199,17 +1229,21 @@ public function allowDebit() {
1199
1229
1200
1230
if ($blIsAuthorization) returntrue;
1201
1231
1232
+
$oDb = $this->_oFcpoHelper->fcpoGetPdoDb();
1202
1233
$sQuery = "
1203
-
SELECT
1204
-
COUNT(*)
1205
-
FROM
1206
-
fcpotransactionstatus
1207
-
WHERE
1208
-
fcpo_txid = '{$this->oxorder__fcpotxid->value}' AND
1209
-
fcpo_txaction = 'appointed'
1234
+
SELECT
1235
+
COUNT(*)
1236
+
FROM
1237
+
fcpotransactionstatus
1238
+
WHERE
1239
+
fcpo_txid = :sTxid
1240
+
AND
1241
+
fcpo_txaction = :sTxaction
1210
1242
";
1211
-
1212
-
$iCount = (int) $this->_oFcpoDb->GetOne($sQuery);
1243
+
$iCount = (int) $oDb->fetchOne($sQuery, [
1244
+
'sTxid' => $this->oxorder__fcpotxid->value,
1245
+
'sTxaction' => 'appointed'
1246
+
]);
1213
1247
1214
1248
$blReturn = ($iCount === 1);
1215
1249
@@ -1300,7 +1334,7 @@ public function isCancellationReasonNeeded()
1300
1334
*/
1301
1335
publicfunctiongetSequenceNumber()
1302
1336
{
1303
-
$iCount = $this->_oFcpoDb->GetOne("SELECT MAX(fcpo_sequencenumber) FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}'");
1337
+
$iCount = $this->_oFcpoDb->GetOne("SELECT MAX(fcpo_sequencenumber) FROM fcpotransactionstatus WHERE fcpo_txid = " . $this->_oFcpoDb->quote($this->oxorder__fcpotxid->value));
1304
1338
1305
1339
$iReturn = ($iCount === null) ? 0 : $iCount + 1;
1306
1340
@@ -1314,7 +1348,7 @@ public function getSequenceNumber()
1314
1348
*/
1315
1349
publicfunctiongetLastStatus()
1316
1350
{
1317
-
$sOxid = $this->_oFcpoDb->GetOne("SELECT * FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}' ORDER BY fcpo_sequencenumber DESC, oxtimestamp DESC");
1351
+
$sOxid = $this->_oFcpoDb->GetOne("SELECT * FROM fcpotransactionstatus WHERE fcpo_txid = " . $this->_oFcpoDb->quote($this->oxorder__fcpotxid->value) . " ORDER BY fcpo_sequencenumber DESC, oxtimestamp DESC");
@@ -1361,7 +1395,7 @@ protected function getRequest($aAcceptedStatus = array('APPROVED'))
1361
1395
$sSelect = "
1362
1396
SELECT oxid
1363
1397
FROM fcporequestlog
1364
-
WHERE fcpo_refnr = '{$this->oxorder__fcporefnr->value}'
1398
+
WHERE fcpo_refnr = ". $this->_oFcpoDb->quote($this->oxorder__fcporefnr->value) . "
1365
1399
AND (
1366
1400
fcpo_requesttype = 'preauthorization' OR
1367
1401
fcpo_requesttype = 'authorization'
@@ -1643,9 +1677,17 @@ public function fcGetArtStockInBasket($oBasket, $sArtId, $sExpiredArtId = null)
1643
1677
*/
1644
1678
publicfunctionfcpoGetMandateFilename()
1645
1679
{
1680
+
$oDb = $this->_oFcpoHelper->fcpoGetPdoDb();
1681
+
1646
1682
$sOxid = $this->getId();
1647
-
$sQuery = "SELECT fcpo_filename FROM fcpopdfmandates WHERE oxorderid = '{$sOxid}'";
1648
-
$sFile = $this->_oFcpoDb->GetOne($sQuery);
1683
+
$sQuery = "
1684
+
SELECT fcpo_filename
1685
+
FROM fcpopdfmandates
1686
+
WHERE oxorderid = :sOxid
1687
+
";
1688
+
$sFile = $oDb->fetchOne($sQuery, [
1689
+
'sOxid' => $sOxid
1690
+
]);
1649
1691
1650
1692
return$sFile;
1651
1693
}
@@ -1658,7 +1700,7 @@ public function fcpoGetMandateFilename()
1658
1700
*/
1659
1701
publicfunctionfcpoGetStatus()
1660
1702
{
1661
-
$sQuery = "SELECT oxid FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}' ORDER BY fcpo_sequencenumber ASC";
1703
+
$sQuery = "SELECT oxid FROM fcpotransactionstatus WHERE fcpo_txid = " . $this->_oFcpoDb->quote($this->oxorder__fcpotxid->value) . " ORDER BY fcpo_sequencenumber ASC";
1662
1704
$aRows = $this->_oFcpoDb->getAll($sQuery);
1663
1705
1664
1706
$aStatus = array();
@@ -2097,17 +2139,18 @@ protected function _fcpoWriteClearingInformation($sPaymentId, $aResponse)
0 commit comments