|
...
|
...
|
@@ -172,6 +172,7 @@ class PayStripeApi |
|
|
|
// 根据事件类型处理
|
|
|
|
switch ($eventType) {
|
|
|
|
case 'payment_intent.succeeded':
|
|
|
|
@file_put_contents(storage_path('logs/lyh_3059_error.log'), var_export('success', true) . PHP_EOL, FILE_APPEND);
|
|
|
|
// 处理支付成功逻辑
|
|
|
|
$paymentIntentId = $eventData['id'];
|
|
|
|
self::getExtensionInfo($paymentIntentId,$eventData);
|
|
...
|
...
|
@@ -202,6 +203,7 @@ class PayStripeApi |
|
|
|
* @time :2024/12/25 14:43
|
|
|
|
*/
|
|
|
|
public static function getExtensionInfo($id,$eventData){
|
|
|
|
@file_put_contents(storage_path('logs/lyh_3059_error.log'), var_export('进入', true) . PHP_EOL, FILE_APPEND);
|
|
|
|
ProjectServer::useProject(3059);
|
|
|
|
$extensionModel = new ExtensionModuleValue();
|
|
|
|
$info = $extensionModel->read(['value'=>$id]);
|
|
...
|
...
|
@@ -213,7 +215,8 @@ class PayStripeApi |
|
|
|
['uuid'=>$info['uuid'],'module_id'=>$info['module_id'],'field_id'=>6,'value'=>'success'],
|
|
|
|
['uuid'=>$info['uuid'],'module_id'=>$info['module_id'],'field_id'=>7,'value'=>json_encode($eventData)],
|
|
|
|
];
|
|
|
|
$extensionModel->insertAll($data);
|
|
|
|
$rs = $extensionModel->insertAll($data);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_3059_error.log'), var_export('结束'.$rs, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|