public function testgetCurrencyType() { //execute the method and test if it works and does not throws an exception. try { getCurrencyType(); $this->assertTrue(true); } catch (Exception $e) { $this->fail(); } $this->markTestIncomplete('This method has no implementation'); }
if (!isset($cart)) { if (!isset($cookie->id_cart) || !isset($cookie->id_user)) { Paylog::msg(0, "100", "检测不到id_cart或者id_user"); die(json_encode(array("isError" => "YES", "msg" => "100"))); } $cart = new Cart($cookie->id_cart); } $Amount = $Amount1 = number_format($cart->getOrderTotal(), 2, '.', ''); $BillNo = $cart->id; $MerNo = Configuration::get('MODULE_PAYMENT_SHT_SELLER'); $MD5key = Configuration::get('MODULE_PAYMENT_SHT_MD5KEY'); $handler = Configuration::get('MODULE_PAYMENT_SHT_HANDLER'); $ReturnURL = Configuration::get('MODULE_PAYMENT_SHT_RETURN_URL'); $Language = Configuration::get('MODULE_PAYMENT_SHT_LANGUAGE'); $Currencytype = Configuration::get('MODULE_PAYMENT_SHT_MONEYTYPE'); $Currencytype = getCurrencyType($Currencytype); $MD5src = $MerNo . $BillNo . $Currencytype . $Amount . $Language . $ReturnURL . trim($MD5key); $MD5info = strtoupper(md5($MD5src)); $data = $_POST; $data['Amount'] = $Amount; //定单金额 $data['BillNo'] = $BillNo; //定单号 $data['Currency'] = $Currencytype; //币种 $data['MD5info'] = $MD5info; //语言 en $data['Language'] = $Language; //语言 en $data['Remark'] = _TM_ROOT_URL_; //备注