设置配置文件不起作用。我尝试如下设置配置文件paypal。它不更新配置变量payment_definition_amount。 为什么我无法设置配置文件 类PlanController扩展控制器 {
public function updatePlan(Request $request)
{
$this->validate($request, [
'plan_id' => 'required|string',
]);
Config::set(['paypal.payment_definition_amount'=>$request['payment_definition_amount']]);
config('paypal.payment_definition_amount', $request['payment_definition_amount']);
return ['message' => "Success",'payment_amount' =>$request['payment_definition_amount']];
}
}
贝宝配置
return [
'plan_id' => 'P-2A5761613A054890GVEZMPLY',
'plan_name'=> 'Monthly Billing Plan',
'plan_type'=> 'FIXED',
'payment_definition_type' => 'REGULAR',
'payment_definition_frequency' => 'Month',
'payment_definition_currency' => 'USD',
'payment_definition_amount' => 100,
'payment_definition_cycles' => '12',
'payment_definition_frequency_interval' => '2',
];