コード例 #1
0
		/**
		 * Send request to payment server
		 * @param float $amount
		 * @param integer $invoiceid
		 * @param string $description
		 * @param string $type 'single or subscription'
		 * @param array $extra
		 * 
		 * @return bool
		 */
		public final function ProceedToPayment($amount, $invoiceid, $description, $type = 'single', $extra = array())
		{
			$host = self::HOSTNAME;
			
			if ($type == 'single')
			{
				$data = array(
								"sid"			=> $this->MerchantID,
								"cart_order_id"	=> $invoiceid,
								"total"			=> $amount,
								"card_holder_name" => $extra["firstname"] . " " . $extra["lastname"],
								"street_address" => $extra["address"],
								"city" 			=> $extra["city"],
								"state" 		=> $extra["state"],
								"zip" 			=> $extra["zip"],
								"country" 		=> $extra["country"],
								"email" 		=> $extra["email"],
								"phone" 		=> $extra["phone"],
								"ship_street_address" => $extra["address"],
								"ship_city" 	=> $extra["city"],
								"ship_zip" 		=> $extra["zip"],
								"ship_country" 	=> $extra["country"],
								"ship_state" 	=> $extra["state"],
								"Product_description" => $description,
								"tco_currency"	=> $this->CurrencyISO,
								"fixed"			=> "Y"
							);
				
				if ($extra["return_url"]) $data["x_receipt_link_url"] = $extra["return_url"];
				if ($extra["product_id"]) $data["product_id"] = $extra["product_id"];
				//$data["merchant_product_id"] = ($extra["merchant_product_id"]) ? $extra["merchant_product_id"] : time();
				
				if ($this->IsDemo()) $data["demo"] = "Y";
				
				//var_dump($data);
				
				CoreUtils::RedirectPOST($host, $data);
			}
			elseif ($type == 'subscription') 
			{
				# todo	
			}
			exit();
		}
コード例 #2
0
ファイル: common.inc.php プロジェクト: rchicoria/epp-drs
	/**
	* Submit HTTP post to $url with form fields $fields
	* @access public
	* @param string $url URL to redirect to
	* @param string $fields Form fields
	* @return void
	* @deprecated 
	*/
	function redirect_post($url, $fields)
	{
		CoreUtils::RedirectPOST($url, $fields);
	}