|
@@ -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);
|