һӭʹweiphp֧ͨ˵

1ϵͳ̨װ
2ڹǰ̨֧Ĳ
3ҳ֧ܣǷͨȷϲǷȷ

˵

Ŀǰ֧ͨͨתURLķʽ߹ܡҪõ֧ʱֻҪ֧ͨṩĽӿڵַװòת֧ͣתָĻصַϡ

1ӿڵַʽ

addons_url ( 'Payment://Alipay/pay', array (
					'from' => ֧ɹĻصַʽaddons_urlĸʽPayment://Payment/playok Shop://Wap/afterPlay,
					'orderName' => ,
					'price' => ֧,
					'token' => ںtoken,
					'wecha_id' => ûopenid,
					'paytype' => ֧ͣͲ˵,
					'orderid' => ,
					'bid' => չID,
					'sid' => չID
			) )


2֧У

<select name="zftype">                          
	<option value="1">֧</option>
	<option value="2">Ƹͨ(WAPֻӿ)</option>
	<option value="3">Ƹͨ(ʱ)</option>
	<option value="0">΢֧</option>
	<option value="4"></option>
</select>


3õPHP demo£


	/**
	 * ********************֧Էκһ߹***********************
	 */
	public function testpay() {
		if (IS_POST) {
			header ( "Content-type: text/html; charset=utf-8" );
			// token
			$token = get_token ();
			// ΢ûID
			$openid = get_openid ();
			// 
			$orderName = urlencode ( "ǲԵĶ" );
			// ID
			$orderid = date ( 'Ymd' ) . substr ( implode ( NULL, array_map ( 'ord', str_split ( substr ( uniqid (), 7, 13 ), 1 ) ) ), 0, 8 );
			// ֧
			$price = $_POST ['zfje'];
			// ֧
			$zftype = $_POST ['zftype'];
			/*
			 * ɹ󷵻صõķ addons_urlĸʽ
			 * GET:token,wecha_id,orderid
			 * playokķ˵ʵַҲɿⶨ
			 */
			$from = "Payment://Payment/playok";
			$bid = "";
			$sid = "";
			redirect ( addons_url ( 'Payment://Alipay/pay', array (
					'from' => $from,
					'orderName' => $orderName,
					'price' => $price,
					'token' => $token,
					'wecha_id' => $openid,
					'paytype' => $zftype,
					'orderid' => $orderid,
					'bid' => $bid,
					'sid' => $sid 
			) ), 1, ',׼ת֧ҳ,벻Ҫظˢҳ,ĵȴ...' );
		} else {
			$normal_tips = '֧';
			$this->assign ( 'normal_tips', $normal_tips );
			$this->display ( "testpay" );
		}
	}
	public function playok() {
		// ֧ɹܵõĲУ
		$token = I ( 'token' );
		$openid = I ( 'wecha_id' );
		$orderid = I ( 'orderid' );
		
		// TODO ￪߿Լ֧ɹĴ
		
		$this->success ( '֧ɹ', U ( 'lists' ) );
	}