作者 lyh

gx数据

@@ -152,7 +152,7 @@ class PayStripeApi @@ -152,7 +152,7 @@ class PayStripeApi
152 // 验证签名 152 // 验证签名
153 if (!self::verifySignature($payload, $sigHeader, $endpointSecret)) { 153 if (!self::verifySignature($payload, $sigHeader, $endpointSecret)) {
154 http_response_code(400); 154 http_response_code(400);
155 - throw new Exception('Invalid signature'); 155 + throw new \Exception('Invalid signature');
156 } 156 }
157 $event = json_decode($payload, true); 157 $event = json_decode($payload, true);
158 // 获取事件类型 158 // 获取事件类型
@@ -175,11 +175,11 @@ class PayStripeApi @@ -175,11 +175,11 @@ class PayStripeApi
175 $chargeId = $eventData['id']; 175 $chargeId = $eventData['id'];
176 break; 176 break;
177 default: 177 default:
178 - throw new Exception('Unhandled event type: ' . $eventType); 178 + throw new \Exception('Unhandled event type: ' . $eventType);
179 } 179 }
180 return $event; 180 return $event;
181 } catch (Exception $e) { 181 } catch (Exception $e) {
182 - throw new Exception('Webhook Error: ' . $e->getMessage()); 182 + throw new \Exception('Webhook Error: ' . $e->getMessage());
183 } 183 }
184 } 184 }
185 185