コード例 #1
0
 private static function transactionLimits($currencyId, $paymentSystemName, $type = 0)
 {
     $paySystem = new PaymentSystem();
     $paySystem->findBy(array('name' => $paymentSystemName));
     $curPaySystem = new CurrencyPaymentSystem();
     $result = $curPaySystem->findBy(array('cur_id' => $currencyId, 'system_id' => $paySystem->getId()));
     if (!$result) {
         $system_fee = 0.0;
         $fee = 0.0;
         $min = 0.0;
         $max = null;
     } else {
         if ($type == 1) {
             $system_fee = $curPaySystem->getSystemFee();
             $fee = $curPaySystem->getOutputFee();
             $min = $curPaySystem->getOutputMin();
             $max = $curPaySystem->getOutputMax();
         } else {
             $system_fee = $curPaySystem->getSystemFee();
             $fee = $curPaySystem->getInputFee();
             $min = $curPaySystem->getInputMin();
             $max = $curPaySystem->getInputMax();
         }
     }
     return array('system_fee' => $system_fee, 'fee' => $fee, 'min' => $min, 'max' => $max);
 }