コード例 #1
0
ファイル: Sender.php プロジェクト: webchemistry/thepay
 /**
  * @param float $float
  * @return self
  * @throws InvalidArgumentException
  */
 public function setValue($float)
 {
     try {
         parent::setValue($float);
     } catch (\TpInvalidArgumentException $e) {
         throw new InvalidArgumentException('Price must be float.');
     }
     return $this;
 }
コード例 #2
0
ファイル: class_thepay.php プロジェクト: janda2/Fitness-shop
 function get_payment_buttons($order_id)
 {
     //nacteme si cenu z objednavky
     $s = sql_query("select price from orders\n\t\t\t\t\t\t\t\t\t\t\t\twhere (id = '" . $order_id . "' and user = '******')");
     $d = sql_fetch_object($s);
     if (!$d->price) {
         return;
     }
     $payment = new TpPayment($this->config);
     $payment->setValue($d->price);
     $payment->setDescription($this->l->t("thepay_title"));
     $payment->setMerchantData($order_id);
     $payment->setReturnUrl("http://www.cbdb.cz/pay_return.php?pay_type=thepay");
     $tpHelper = new TpDivMerchantHelper($payment);
     return $tpHelper->render();
 }