/**
  * Adding folder check.
  *
  * @param array  $aWhere  SQL condition array.
  * @param string $sqlFull SQL query string.
  *
  * @return string
  */
 protected function _prepareWhereQuery($aWhere, $sqlFull)
 {
     $oDb = oxDb::getDb();
     $sQ = parent::_prepareWhereQuery($aWhere, $sqlFull);
     $sPaymentStatus = oxRegistry::getConfig()->getRequestParameter("paypalpaymentstatus");
     $oPaymentStatusList = new oePayPalOrderPaymentStatusList();
     if ($sPaymentStatus && $sPaymentStatus != '-1' && in_array($sPaymentStatus, $oPaymentStatusList->getArray())) {
         $sQ .= " AND ( `oepaypal_order`.`oepaypal_paymentstatus` = " . $oDb->quote($sPaymentStatus) . " )";
         $sQ .= " AND ( `oepaypal_order`.`oepaypal_orderid` IS NOT NULL ) ";
     }
     $sPayment = oxRegistry::getConfig()->getRequestParameter("paypalpayment");
     if ($sPayment && $sPayment != '-1') {
         $sQ .= " and ( oxorder.oxpaymenttype = " . $oDb->quote($sPayment) . " )";
     }
     return $sQ;
 }
 /**
  * Testing adding amount to PayPal refunded amount
  *
  * @dataProvider testAvailableStatuses_dataProvider
  */
 public function testGetAvailableStatuses($sAction, $aStatusList)
 {
     $oStatusList = new oePayPalOrderPaymentStatusList();
     $this->assertEquals($aStatusList, $oStatusList->getAvailableStatuses($sAction));
 }