作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

... ... @@ -60,7 +60,7 @@ class SyncFile extends Command
//同步到大文件
$file_path = config('filesystems.disks.cos')['cdn1'].$path_name;
$directoryPath = pathinfo($path_name, PATHINFO_DIRNAME);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
$cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
return shell_exec($cmd);
}
... ... @@ -69,7 +69,7 @@ class SyncFile extends Command
//同步到大文件
$file_path = config('filesystems.disks.s3')['cdn'].$path_name;
$directoryPath = pathinfo($path_name, PATHINFO_DIRNAME);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
$cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
return shell_exec($cmd);
}
}
... ...
... ... @@ -54,7 +54,7 @@ class SyncTimeMinuteFile extends Command
$this->param['name'] = basename($path);
$this->param['path'] = str_replace('/'.$this->param['name'],'',$path);
$file_path = $this->getUrl($this->param['path'].'/'.$this->param['name'], 0,0);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php';
$cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php';
echo date('Y-m-d H:i:s') . ' | ' . $cmd . PHP_EOL;
$code = shell_exec($cmd);
if(200 != (int)$code){
... ...
... ... @@ -76,7 +76,7 @@ class ProductFileUpload extends Command
$file_path = config('filesystems.disks.cos')['cdn1'].$path_name;
echo date('Y-m-d H:i:s') . '编辑的path为:'. $file_path. PHP_EOL;
$directoryPath = pathinfo($path_name, PATHINFO_DIRNAME);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" -F "file_name='.$newName.'" https://v6-file.globalso.com/fileUploads.php';
$cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" -F "file_name='.$newName.'" https://v6-file.globalso.com/fileUploads.php';
return shell_exec($cmd);
}
}
... ...
... ... @@ -59,7 +59,7 @@ class SyncProjectFile extends Command
//同步到大文件
$file_path = config('filesystems.disks.cos')['cdn1'].$path_name;
$directoryPath = pathinfo($path_name, PATHINFO_DIRNAME);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
$cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
return shell_exec($cmd);
}
... ... @@ -68,7 +68,7 @@ class SyncProjectFile extends Command
//同步到大文件
$file_path = config('filesystems.disks.s3')['cdn'].$path_name;
$directoryPath = pathinfo($path_name, PATHINFO_DIRNAME);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
$cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
return shell_exec($cmd);
}
}
... ...
... ... @@ -42,7 +42,7 @@ class SyncTimeFiles extends Command
$this->param['name'] = basename($path);
$this->param['path'] = str_replace('/'.$this->param['name'],'',$path);
$file_path = $this->getUrl($this->param['path'].'/'.$this->param['name'], 0,0);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php';
$cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php';
echo date('Y-m-d H:i:s') . ' | ' . $cmd . PHP_EOL;
$code = shell_exec($cmd);
if(200 != (int)$code){
... ...
... ... @@ -33,7 +33,7 @@ class SyncVideo extends Command
$this->param['name'] = basename($path);
$this->param['path'] = str_replace('/'.$this->param['name'],'',$path);
$file_path = $this->getUrl($this->param['path'].'/'.$this->param['name'], 0,0);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php';
$cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php';
echo date('Y-m-d H:i:s') . ' | ' . $cmd . PHP_EOL;
$code = shell_exec($cmd);
echo date('Y-m-d H:i:s') . ' | ' . $code . PHP_EOL;
... ...
... ... @@ -18,24 +18,24 @@ class PayStripeApi
private $secretKey;
//币种对应支付方式
public $currency_types = [
'usd' => ['card', 'cashapp', 'link', 'afterpay_clearpay'],
'eur' => ['card', 'ideal', 'giropay', 'sofort', 'bancontact', 'klarna', 'link'],
'gbp' => ['card', 'apple_pay', 'google_pay', 'klarna', 'link', 'afterpay_clearpay'],
'aud' => ['card', 'afterpay_clearpay', 'apple_pay', 'google_pay'],
'cad' => ['card', 'apple_pay', 'google_pay', 'link'],
'sgd' => ['card', 'grabpay', 'fpx', 'google_pay'],
'jpy' => ['card', 'apple_pay', 'google_pay'],
'usd' => ['card', 'cashapp', 'link', 'alipay', 'wechat_pay', 'afterpay_clearpay'],
// 'eur' => ['card', 'ideal', 'giropay', 'sofort', 'bancontact', 'klarna', 'link'],
// 'gbp' => ['card', 'apple_pay', 'google_pay', 'klarna', 'link', 'afterpay_clearpay'],
// 'aud' => ['card', 'afterpay_clearpay', 'apple_pay', 'google_pay'],
// 'cad' => ['card', 'apple_pay', 'google_pay', 'link'],
// 'sgd' => ['card', 'grabpay', 'fpx', 'google_pay'],
// 'jpy' => ['card', 'apple_pay', 'google_pay'],
'cny' => ['alipay', 'wechat_pay'],
'brl' => ['card', 'boleto', 'pix'],
'mxn' => ['card', 'oxxo'],
'inr' => ['card', 'upi', 'netbanking'],
'php' => ['card', 'paymaya', 'gcash'],
'myr' => ['card', 'fpx'],
'thb' => ['card', 'promptpay'],
'idr' => ['card', 'bank_transfer'],
'zar' => ['card'],
'ngn' => ['card'],
'aed' => ['card', 'apple_pay', 'google_pay']
// 'brl' => ['card', 'boleto', 'pix'],
// 'mxn' => ['card', 'oxxo'],
// 'inr' => ['card', 'upi', 'netbanking'],
// 'php' => ['card', 'paymaya', 'gcash'],
// 'myr' => ['card', 'fpx'],
// 'thb' => ['card', 'promptpay'],
// 'idr' => ['card', 'bank_transfer'],
// 'zar' => ['card'],
// 'ngn' => ['card'],
// 'aed' => ['card', 'apple_pay', 'google_pay']
];
// 构造函数设置密钥
... ...
... ... @@ -101,31 +101,14 @@ class Extension3059ModuleController extends BaseController
*/
public function save3059OrderDetail(){
ProjectServer::useProject(3059);
// $this->param = [
// 'amount'=>1000,
// 'currency'=>'cny',
// 'payment_method_types'=>'alipay',
// 'data'=>[
// ['field_id'=>2, 'value'=>'20241225114204'],
// ['field_id'=>3, 'value'=>date('Y-m-d H:i:s')],
// ['field_id'=>4, 'value'=>1000],
// ['field_id'=>5, 'value'=>'成都市武侯区二仙桥走成华大道'],
// ['field_id'=>9, 'value'=>'cny'],
// ['field_id'=>10, 'value'=>'alipay'],
// ['field_id'=>14, 'value'=>'二仙桥大爷'],
// ['field_id'=>15, 'value'=>'15687012587'],
// ]
// ];
$this->request->validate([
'data'=>'required',
'amount'=>'required',
'currency'=>'required',
'payment_method_types'=>'required',
],[
'data.required' => '数据不能为空',
'amount.required' => '金额不能为空',
'currency.required' => '币种不能为空',
'payment_method_types.required' => '支付方式不能为空',
]);
$this->param['module_id'] = 1;//默认订单模块
$moduleValueModel = new ExtensionModuleValue();
... ... @@ -151,7 +134,7 @@ class Extension3059ModuleController extends BaseController
];
}
$pay = new PayStripeApi();
$payData = $pay->createPaymentIntent($this->param['amount'],$this->param['currency'],$this->param['payment_method_types']);
$payData = $pay->createPaymentIntent($this->param['amount'],$this->param['currency']);
$saveData[] = ['uuid'=>$uuid,'module_id'=>$this->param['module_id'],'field_id'=>8,'value'=>$payData['id'] ?? '未获取到支付意愿,请重新获取'];
$moduleValueModel->insertAll($saveData);
}catch (\Exception $e){
... ...