Browse Source

commit pay

superbee 8 years ago
parent
commit
783de9cf73
2 changed files with 7 additions and 7 deletions
  1. 1 1
      application/home/controller/Index.php
  2. 6 6
      application/home/controller/Pay.php

+ 1 - 1
application/home/controller/Index.php

@@ -9,7 +9,7 @@ class Index extends Controller {
 	
 	public function index()
 	{
-		$data = Db::name('config')->where(['id'=>1])->find();
+		$data = Db::name('config')->select();
 		return json(["l"=>$data]);
 	}
 	

+ 6 - 6
application/home/controller/Pay.php

@@ -19,17 +19,17 @@ class Pay extends Controller{
 	public function pay(){
 		$data = decode($this->request->post());
 		
-// 		$data['i'] = 'com.dashgame.garden.packfresh';
-// 		$data['t'] = 1;
-// 		$data['u'] = 1704251601802555535;
+		$data['i'] = 'com.dashgame.garden.packone';
+		$data['t'] = 1;
+		$data['u'] = 1704251601802555535;
 		
-		$ipaInfo = Db::name('iap_config')->where(['item_id'=>$data['i']])->find();
-		if(empty($ipaInfo)) exit(json(['error'=>1111]));
+		$iapInfo = Db::name('iap_config')->where(['item_id'=>$data['i']])->find();
+		if(empty($iapInfo)) exit(json(['error'=>1111]));
 		
 		$plugin = $this->payPluginModel->getPayPluginByType($data['t']);
 		if(empty($plugin)) exit(json(['error'=>1111]));
 		
-		$biz_content = $this->getAliTradeInfo($ipaInfo, $data['u']);
+		$biz_content = $this->getAliTradeInfo($iapInfo, $data['u']);
 		$val = $this->getAliPayInfo($plugin, $biz_content);
 		
 		return http_build_query($val);