PayPal 웹훅 테스트

웹훅 URL: https://www.thinkocn.com/plugin/paypal_subscription/includes/webhook.php

테스트 웹훅 데이터:

{
    "id": "WH-2W724009AC2067914-5Z725107KP7987537",
    "event_version": "1.0",
    "create_time": "2025-08-13T10:31:57.000Z",
    "resource_type": "subscription",
    "event_type": "BILLING.SUBSCRIPTION.ACTIVATED",
    "summary": "Subscription activated",
    "resource": {
        "id": "I-9FMY6D16NWL0",
        "plan_id": "P-3MC99372MN303192FNCNWNAY",
        "status": "ACTIVE",
        "status_update_time": "2025-08-13T10:31:57Z",
        "subscriber": {
            "email_address": "test@example.com",
            "name": {
                "given_name": "Test",
                "surname": "User"
            }
        },
        "billing_info": {
            "outstanding_balance": {
                "currency_code": "USD",
                "value": "0.00"
            },
            "cycle_executions": [
                {
                    "tenure_type": "REGULAR",
                    "sequence": 1,
                    "cycles_completed": 0,
                    "cycles_remaining": 0
                }
            ],
            "next_billing_time": "2026-08-13T10:31:57Z"
        },
        "create_time": "2025-08-13T10:31:57Z",
        "links": [
            {
                "href": "https:\/\/api-m.sandbox.paypal.com\/v1\/billing\/subscriptions\/I-9FMY6D16NWL0",
                "rel": "self",
                "method": "GET"
            }
        ]
    },
    "links": [
        {
            "href": "https:\/\/api-m.sandbox.paypal.com\/v1\/notifications\/webhooks-events\/WH-2W724009AC2067914-5Z725107KP7987537",
            "rel": "self",
            "method": "GET"
        }
    ]
}

웹훅 테스트 실행:

테스트 시작...
HTTP 응답 코드: 200
응답 내용:
{"status":"success","message":"Webhook processed successfully","timestamp":"2025-08-23T15:11:56+09:00"}

웹훅 로그:

[2025-08-23 12:41:34] [INFO] Gnuboard environment loaded | Data: {"path":"..\/..\/..\/common.php"}
[2025-08-23 12:41:34] [INFO] G5 table prefix set | Data: {"prefix":"g5_"}
[2025-08-23 12:41:34] [INFO] Webhook received | Data: {"method":"GET","payload_size":0}
[2025-08-23 12:41:34] [ERROR] Invalid request method | Data: {"method":"GET"}
[2025-08-23 15:11:56] [INFO] Gnuboard environment loaded | Data: {"path":"..\/..\/..\/common.php"}
[2025-08-23 15:11:56] [INFO] G5 table prefix set | Data: {"prefix":"g5_"}
[2025-08-23 15:11:56] [INFO] Webhook received | Data: {"method":"POST","payload_size":1002}
[2025-08-23 15:11:56] [INFO] Processing webhook event | Data: {"event_type":"BILLING.SUBSCRIPTION.ACTIVATED","event_id":"WH-2W724009AC2067914-5Z725107KP7987537","resource_id":"I-9FMY6D16NWL0","table_prefix":"g5_","full_payload":{"id":"WH-2W724009AC2067914-5Z725107KP7987537","event_version":"1.0","create_time":"2025-08-13T10:31:57.000Z","resource_type":"subscription","event_type":"BILLING.SUBSCRIPTION.ACTIVATED","summary":"Subscription activated","resource":{"id":"I-9FMY6D16NWL0","plan_id":"P-3MC99372MN303192FNCNWNAY","status":"ACTIVE","status_update_time":"2025-08-13T10:31:57Z","subscriber":{"email_address":"test@example.com","name":{"given_name":"Test","surname":"User"}},"billing_info":{"outstanding_balance":{"currency_code":"USD","value":"0.00"},"cycle_executions":[{"tenure_type":"REGULAR","sequence":1,"cycles_completed":0,"cycles_remaining":0}],"next_billing_time":"2026-08-13T10:31:57Z"},"create_time":"2025-08-13T10:31:57Z","links":[{"href":"https:\/\/api-m.sandbox.paypal.com\/v1\/billing\/subscriptions\/I-9FMY6D16NWL0","rel":"self","method":"GET"}]},"links":[{"href":"https:\/\/api-m.sandbox.paypal.com\/v1\/notifications\/webhooks-events\/WH-2W724009AC2067914-5Z725107KP7987537","rel":"self","method":"GET"}]}}
[2025-08-23 15:11:56] [INFO] Processing subscription activation | Data: {"paypal_sub_id":"I-9FMY6D16NWL0","plan_id":"P-3MC99372MN303192FNCNWNAY"}
[2025-08-23 15:11:56] [INFO] Executing SQL query | Data: {"sql":"SELECT * FROM g5_subscription WHERE paypal_sub_id = 'I-9FMY6D16NWL0'"}
[2025-08-23 15:11:56] [INFO] Member upgraded to premium | Data: {"mb_id":"test_user","level":5}
[2025-08-23 15:11:56] [INFO] Subscription activated successfully | Data: {"mb_id":"test_user"}
[2025-08-23 15:11:56] [INFO] Webhook processed successfully | Data: {"event_type":"BILLING.SUBSCRIPTION.ACTIVATED"}

현재 데이터베이스 구독 정보:


Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/plugin/paypal_subscription/test/webhook_test.php:118) in /var/www/html/common.php on line 8

Warning: Constant _GNUBOARD_ already defined in /var/www/html/config.php on line 8

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/common.php on line 223

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/common.php on line 224

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/common.php on line 225

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/common.php on line 226

Warning: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent in /var/www/html/common.php on line 229

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/common.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/plugin/paypal_subscription/test/webhook_test.php:118) in /var/www/html/lib/common.lib.php on line 167

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/plugin/paypal_subscription/test/webhook_test.php:118) in /var/www/html/common.php on line 845

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/plugin/paypal_subscription/test/webhook_test.php:118) in /var/www/html/common.php on line 847

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/plugin/paypal_subscription/test/webhook_test.php:118) in /var/www/html/common.php on line 848

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/plugin/paypal_subscription/test/webhook_test.php:118) in /var/www/html/common.php on line 849

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/plugin/paypal_subscription/test/webhook_test.php:118) in /var/www/html/common.php on line 850

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/plugin/paypal_subscription/test/webhook_test.php:118) in /var/www/html/common.php on line 851

그누보드 환경 로드 성공: ../../../common.php


Warning: Undefined array key "table_prefix" in /var/www/html/plugin/paypal_subscription/test/webhook_test.php on line 200

Fatal error: Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in /var/www/html/lib/common.lib.php:1925 Stack trace: #0 /var/www/html/lib/common.lib.php(1925): mysqli_num_rows() #1 /var/www/html/plugin/paypal_subscription/test/webhook_test.php(203): sql_num_rows() #2 {main} thrown in /var/www/html/lib/common.lib.php on line 1925