|
@@ -18,6 +18,19 @@ use App\Models\ExtentModule\ExtensionModuleValue; |
|
@@ -18,6 +18,19 @@ use App\Models\ExtentModule\ExtensionModuleValue; |
|
18
|
class Extension3059ModuleController extends BaseController
|
18
|
class Extension3059ModuleController extends BaseController
|
|
19
|
{
|
19
|
{
|
|
20
|
/**
|
20
|
/**
|
|
|
|
21
|
+ * @remark :获取所有的支付方式
|
|
|
|
22
|
+ * @name :getPayMethod
|
|
|
|
23
|
+ * @author :lyh
|
|
|
|
24
|
+ * @method :post
|
|
|
|
25
|
+ * @time :2024/12/25 16:01
|
|
|
|
26
|
+ */
|
|
|
|
27
|
+ public function getPayMethod(){
|
|
|
|
28
|
+ $pay = new PayStripeApi();
|
|
|
|
29
|
+ $data = $pay->currency_types;
|
|
|
|
30
|
+ $this->response('success',Code::SUCCESS,$data);
|
|
|
|
31
|
+ }
|
|
|
|
32
|
+
|
|
|
|
33
|
+ /**
|
|
21
|
* @remark :获取当前所有的商品列表
|
34
|
* @remark :获取当前所有的商品列表
|
|
22
|
* @name :getProductLists
|
35
|
* @name :getProductLists
|
|
23
|
* @author :lyh
|
36
|
* @author :lyh
|
|
@@ -75,32 +88,32 @@ class Extension3059ModuleController extends BaseController |
|
@@ -75,32 +88,32 @@ class Extension3059ModuleController extends BaseController |
|
75
|
* @time :2024/12/25 10:26
|
88
|
* @time :2024/12/25 10:26
|
|
76
|
*/
|
89
|
*/
|
|
77
|
public function save3059OrderDetail(){
|
90
|
public function save3059OrderDetail(){
|
|
78
|
- $this->param = [
|
|
|
|
79
|
- 'amount'=>1000,
|
|
|
|
80
|
- 'currency'=>'cny',
|
|
|
|
81
|
- 'payment_method_types'=>'alipay',
|
|
|
|
82
|
- 'data'=>[
|
|
|
|
83
|
- ['field_id'=>2, 'value'=>'20241225114204'],
|
|
|
|
84
|
- ['field_id'=>3, 'value'=>date('Y-m-d H:i:s')],
|
|
|
|
85
|
- ['field_id'=>4, 'value'=>1000],
|
|
|
|
86
|
- ['field_id'=>5, 'value'=>'成都市武侯区二仙桥走成华大道'],
|
|
|
|
87
|
- ['field_id'=>9, 'value'=>'cny'],
|
|
|
|
88
|
- ['field_id'=>10, 'value'=>'alipay'],
|
|
|
|
89
|
- ['field_id'=>14, 'value'=>'二仙桥大爷'],
|
|
|
|
90
|
- ['field_id'=>15, 'value'=>'15687012587'],
|
|
|
|
91
|
- ]
|
|
|
|
92
|
- ];
|
|
|
|
93
|
-// $this->request->validate([
|
|
|
|
94
|
-// 'data'=>'required',
|
|
|
|
95
|
-// 'amount'=>'required',
|
|
|
|
96
|
-// 'currency'=>'required',
|
|
|
|
97
|
-// 'payment_method_types'=>'required',
|
|
|
|
98
|
-// ],[
|
|
|
|
99
|
-// 'data.required' => '数据不能为空',
|
|
|
|
100
|
-// 'amount.required' => '金额不能为空',
|
|
|
|
101
|
-// 'currency.required' => '币种不能为空',
|
|
|
|
102
|
-// 'payment_method_types.required' => '支付方式不能为空',
|
|
|
|
103
|
-// ]);
|
91
|
+// $this->param = [
|
|
|
|
92
|
+// 'amount'=>1000,
|
|
|
|
93
|
+// 'currency'=>'cny',
|
|
|
|
94
|
+// 'payment_method_types'=>'alipay',
|
|
|
|
95
|
+// 'data'=>[
|
|
|
|
96
|
+// ['field_id'=>2, 'value'=>'20241225114204'],
|
|
|
|
97
|
+// ['field_id'=>3, 'value'=>date('Y-m-d H:i:s')],
|
|
|
|
98
|
+// ['field_id'=>4, 'value'=>1000],
|
|
|
|
99
|
+// ['field_id'=>5, 'value'=>'成都市武侯区二仙桥走成华大道'],
|
|
|
|
100
|
+// ['field_id'=>9, 'value'=>'cny'],
|
|
|
|
101
|
+// ['field_id'=>10, 'value'=>'alipay'],
|
|
|
|
102
|
+// ['field_id'=>14, 'value'=>'二仙桥大爷'],
|
|
|
|
103
|
+// ['field_id'=>15, 'value'=>'15687012587'],
|
|
|
|
104
|
+// ]
|
|
|
|
105
|
+// ];
|
|
|
|
106
|
+ $this->request->validate([
|
|
|
|
107
|
+ 'data'=>'required',
|
|
|
|
108
|
+ 'amount'=>'required',
|
|
|
|
109
|
+ 'currency'=>'required',
|
|
|
|
110
|
+ 'payment_method_types'=>'required',
|
|
|
|
111
|
+ ],[
|
|
|
|
112
|
+ 'data.required' => '数据不能为空',
|
|
|
|
113
|
+ 'amount.required' => '金额不能为空',
|
|
|
|
114
|
+ 'currency.required' => '币种不能为空',
|
|
|
|
115
|
+ 'payment_method_types.required' => '支付方式不能为空',
|
|
|
|
116
|
+ ]);
|
|
104
|
$this->param['module_id'] = 1;//默认订单模块
|
117
|
$this->param['module_id'] = 1;//默认订单模块
|
|
105
|
$moduleValueModel = new ExtensionModuleValue();
|
118
|
$moduleValueModel = new ExtensionModuleValue();
|
|
106
|
$info = $moduleValueModel->where('module_id',$this->param['module_id'])->orderBy('uuid','desc')->first();
|
119
|
$info = $moduleValueModel->where('module_id',$this->param['module_id'])->orderBy('uuid','desc')->first();
|