@@ 79-90 (lines=12) @@ | ||
76 | * @param string $sStatus |
|
77 | * @return string |
|
78 | */ |
|
79 | public function getStateByStatus($sStatus) |
|
80 | { |
|
81 | $sQuery = " SELECT |
|
82 | state |
|
83 | FROM |
|
84 | ".$this->databaseResource->getTableName('sales_order_status_state')." |
|
85 | WHERE |
|
86 | status = :status |
|
87 | LIMIT 1"; |
|
88 | $sState = $this->getDb()->fetchOne($sQuery, ['status' => $sStatus]); |
|
89 | return $sState; |
|
90 | } |
|
91 | ||
92 | /** |
|
93 | * Get the order increment id by the given TransactionStatus txid |
|
@@ 98-109 (lines=12) @@ | ||
95 | * @param string $sTxid |
|
96 | * @return string |
|
97 | */ |
|
98 | public function getOrderIncrementIdByTxid($sTxid) |
|
99 | { |
|
100 | $sQuery = " SELECT |
|
101 | order_id |
|
102 | FROM |
|
103 | ".$this->databaseResource->getTableName('payone_protocol_api')." |
|
104 | WHERE |
|
105 | txid = :txid |
|
106 | LIMIT 1"; |
|
107 | $sIncrementId = $this->getDb()->fetchOne($sQuery, ['txid' => $sTxid]); |
|
108 | return $sIncrementId; |
|
109 | } |
|
110 | ||
111 | /** |
|
112 | * Get module info from db |
|
@@ 134-144 (lines=11) @@ | ||
131 | * @param string $sOrderId |
|
132 | * @return string|bool |
|
133 | */ |
|
134 | public function getIncrementIdByOrderId($sOrderId) |
|
135 | { |
|
136 | $sQuery = " SELECT |
|
137 | increment_id |
|
138 | FROM |
|
139 | ".$this->databaseResource->getTableName('sales_order')." |
|
140 | WHERE |
|
141 | entity_id = :entity_id"; |
|
142 | $sIncrementId = $this->getDb()->fetchOne($sQuery, ['entity_id' => $sOrderId]); |
|
143 | return $sIncrementId; |
|
144 | } |
|
145 | ||
146 | /** |
|
147 | * Get payone user id by given customer nr |
|
@@ 152-163 (lines=12) @@ | ||
149 | * @param string $sCustNr |
|
150 | * @return string |
|
151 | */ |
|
152 | public function getPayoneUserIdByCustNr($sCustNr) |
|
153 | { |
|
154 | $sQuery = " SELECT |
|
155 | userid |
|
156 | FROM |
|
157 | ".$this->databaseResource->getTableName('payone_protocol_transactionstatus')." |
|
158 | WHERE |
|
159 | customerid = :customerid |
|
160 | LIMIT 1"; |
|
161 | $sUserId = $this->getDb()->fetchOne($sQuery, ['customerid' => $sCustNr]); |
|
162 | return $sUserId; |
|
163 | } |
|
164 | ||
165 | /** |
|
166 | * Get the next sequencenumber for this transaction |