public function testGetPaymentsByPrice_購入金額がすべての下限を下回る場合_下限の設定がないものだけ取得できる()
 {
     $deliv_id = '1003';
     $total = 9999;
     $helper = new SC_Helper_Purchase();
     $this->expected = array('3002', '3004');
     $result = $helper->getPaymentsByPrice($total, $deliv_id);
     $this->actual = Test_Utils::mapCols($result, 'payment_id');
     $this->verify();
 }
コード例 #2
0
 /**
  * 配送業者IDから, 支払い方法, お届け時間の配列を取得する.
  *
  * 結果の連想配列の添字の値は以下の通り
  * - 'arrDelivTime' - お届け時間の配列
  * - 'arrPayment' - 支払い方法の配列
  * - 'img_show' - 支払い方法の画像の有無
  *
  * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
  * @param SC_CartSession $objCartSess SC_CartSession インスタンス
  * @param integer $deliv_id 配送業者ID
  * @return array 支払い方法, お届け時間を格納した配列
  */
 function getSelectedDeliv(&$objPurchase, &$objCartSess, $deliv_id)
 {
     $arrResults = array();
     $arrResults['arrDelivTime'] = $objPurchase->getDelivTime($deliv_id);
     $total = $objCartSess->getAllProductsTotal($objCartSess->getKey(), $deliv_id);
     $arrResults['arrPayment'] = $objPurchase->getPaymentsByPrice($total, $deliv_id);
     $arrResults['img_show'] = $this->hasPaymentImage($arrResults['arrPayment']);
     return $arrResults;
 }