正在显示
1 个修改的文件
包含
1 行增加
和
18 行删除
| @@ -101,31 +101,14 @@ class Extension3059ModuleController extends BaseController | @@ -101,31 +101,14 @@ class Extension3059ModuleController extends BaseController | ||
| 101 | */ | 101 | */ |
| 102 | public function save3059OrderDetail(){ | 102 | public function save3059OrderDetail(){ |
| 103 | ProjectServer::useProject(3059); | 103 | ProjectServer::useProject(3059); |
| 104 | -// $this->param = [ | ||
| 105 | -// 'amount'=>1000, | ||
| 106 | -// 'currency'=>'cny', | ||
| 107 | -// 'payment_method_types'=>'alipay', | ||
| 108 | -// 'data'=>[ | ||
| 109 | -// ['field_id'=>2, 'value'=>'20241225114204'], | ||
| 110 | -// ['field_id'=>3, 'value'=>date('Y-m-d H:i:s')], | ||
| 111 | -// ['field_id'=>4, 'value'=>1000], | ||
| 112 | -// ['field_id'=>5, 'value'=>'成都市武侯区二仙桥走成华大道'], | ||
| 113 | -// ['field_id'=>9, 'value'=>'cny'], | ||
| 114 | -// ['field_id'=>10, 'value'=>'alipay'], | ||
| 115 | -// ['field_id'=>14, 'value'=>'二仙桥大爷'], | ||
| 116 | -// ['field_id'=>15, 'value'=>'15687012587'], | ||
| 117 | -// ] | ||
| 118 | -// ]; | ||
| 119 | $this->request->validate([ | 104 | $this->request->validate([ |
| 120 | 'data'=>'required', | 105 | 'data'=>'required', |
| 121 | 'amount'=>'required', | 106 | 'amount'=>'required', |
| 122 | 'currency'=>'required', | 107 | 'currency'=>'required', |
| 123 | - 'payment_method_types'=>'required', | ||
| 124 | ],[ | 108 | ],[ |
| 125 | 'data.required' => '数据不能为空', | 109 | 'data.required' => '数据不能为空', |
| 126 | 'amount.required' => '金额不能为空', | 110 | 'amount.required' => '金额不能为空', |
| 127 | 'currency.required' => '币种不能为空', | 111 | 'currency.required' => '币种不能为空', |
| 128 | - 'payment_method_types.required' => '支付方式不能为空', | ||
| 129 | ]); | 112 | ]); |
| 130 | $this->param['module_id'] = 1;//默认订单模块 | 113 | $this->param['module_id'] = 1;//默认订单模块 |
| 131 | $moduleValueModel = new ExtensionModuleValue(); | 114 | $moduleValueModel = new ExtensionModuleValue(); |
| @@ -151,7 +134,7 @@ class Extension3059ModuleController extends BaseController | @@ -151,7 +134,7 @@ class Extension3059ModuleController extends BaseController | ||
| 151 | ]; | 134 | ]; |
| 152 | } | 135 | } |
| 153 | $pay = new PayStripeApi(); | 136 | $pay = new PayStripeApi(); |
| 154 | - $payData = $pay->createPaymentIntent($this->param['amount'],$this->param['currency'],$this->param['payment_method_types']); | 137 | + $payData = $pay->createPaymentIntent($this->param['amount'],$this->param['currency']); |
| 155 | $saveData[] = ['uuid'=>$uuid,'module_id'=>$this->param['module_id'],'field_id'=>8,'value'=>$payData['id'] ?? '未获取到支付意愿,请重新获取']; | 138 | $saveData[] = ['uuid'=>$uuid,'module_id'=>$this->param['module_id'],'field_id'=>8,'value'=>$payData['id'] ?? '未获取到支付意愿,请重新获取']; |
| 156 | $moduleValueModel->insertAll($saveData); | 139 | $moduleValueModel->insertAll($saveData); |
| 157 | }catch (\Exception $e){ | 140 | }catch (\Exception $e){ |
-
请 注册 或 登录 后发表评论