- /**
- * Get payment token by order payment Id.
- *
- * @param int $paymentId
- * @return array
- */
- public function getByOrderPaymentId($paymentId)
- {
- $connection = $this->getConnection();
- $select = $connection
- ->select()
- ->from($this->getMainTable())
- ->joinInner(
- $this->getTable(InstallSchema::ORDER_PAYMENT_TO_PAYMENT_TOKEN_TABLE),
- 'payment_token_id = entity_id',
- null
- )
- ->where('order_payment_id = ?', (int) $paymentId);
- return $connection->fetchRow($select);
- }