Merge pull request #39 from GameServerPanel/copilot/fix-paypal-cart-error

Fix duplicate JSON output in PayPal capture endpoint
This commit is contained in:
Frank Harris 2025-10-29 17:18:06 -04:00 committed by GitHub
commit 5fd7a009ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,7 +91,6 @@ if ($http !== 201 && $http !== 200) {
// Extract payment details
$txid = null;
capture_log('paypal_capture_success', $capture);
echo json_encode($capture);
if (isset($capture['purchase_units'][0]['payments']['captures'][0])) {
$txid = $capture['purchase_units'][0]['payments']['captures'][0]['id'] ?? null;
}