• Новые темы в этом разделе публикуются автоматически при добавлении файла в менеджер ресурсов.
    Ручное создание новых тем невозможно.
Иконка ресурса

Скрипт Paypal для L2

lxtopxm,
если после этих манипуляций сделав платеж данные в файле debug.log не появятся, на вебхук не приходят данные о платежах.
Тогда неправильно настроен в дашборте палки, в своем файле config.php
 
не приходит туда
 
lxtopxm, сделать скрин как в дашборде палки прописан урл вебхука и путь до файла webhook.php расположенного на сайте. часть домена на скринах можно замазать, что бы не палить
 


перешел на другой хост вообще кнопка не работает

Код:
request:
Array
(
    [id] => WH-2YC93377HA1473009-88A40086U9714233Y
    [event_version] => 1.0
    [create_time] => 2022-09-06T12:21:16.529Z
    [resource_type] => checkout-order
    [resource_version] => 2.0
    [event_type] => CHECKOUT.ORDER.APPROVED
    [summary] => An order has been approved by buyer
    [resource] => Array
        (
            [create_time] => 2022-09-06T12:21:08Z
            [purchase_units] => Array
                (
                    [0] => Array
                        (
                            [reference_id] => default
                            [amount] => Array
                                (
                                    [currency_code] => USD
                                    [value] => 1222.00
                                )

                            [payee] => Array
                                (
                                    [email_address] => sb-0iekr20705814@business.example.com
                                    [merchant_id] => 2ABZJT4Y5AGCA
                                    [display_data] => Array
                                        (
                                            [brand_name] => ???? ?????? ?????????? ;)
                                        )

                                )

                            [invoice_id] => server1|asdasdasdasd|1662466867
                        )

                )

            [links] => Array
                (
                    [0] => Array
                        (
                            [href] => https://api.sandbox.paypal.com/v2/checkout/orders/3LM99742ND891473E
                            [rel] => self
                            [method] => GET
                        )

                    [1] => Array
                        (
                            [href] => https://api.sandbox.paypal.com/v2/checkout/orders/3LM99742ND891473E
                            [rel] => update
                            [method] => PATCH
                        )

                    [2] => Array
                        (
                            [href] => https://api.sandbox.paypal.com/v2/checkout/orders/3LM99742ND891473E/capture
                            [rel] => capture
                            [method] => POST
                        )

                )

            [id] => 3LM99742ND891473E
            [payment_source] => Array
                (
                    [paypal] => Array
                        (
                        )

                )

            [intent] => CAPTURE
            [payer] => Array
                (
                    [name] => Array
                        (
                            [given_name] => John
                            [surname] => Doe
                        )

                    [email_address] => sb-5jmpw15290534@personal.example.com
                    [payer_id] => KWDHAEWH27644
                    [address] => Array
                        (
                            [country_code] => GT
                        )

                )

            [status] => APPROVED
        )

    [links] => Array
        (
            [0] => Array
                (
                    [href] => https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2YC93377HA1473009-88A40086U9714233Y
                    [rel] => self
                    [method] => GET
                )

            [1] => Array
                (
                    [href] => https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2YC93377HA1473009-88A40086U9714233Y/resend
                    [rel] => resend
                    [method] => POST
                )

        )

)

response:
Array
(
    [id] => 3LM99742ND891473E
    [intent] => CAPTURE
    [status] => COMPLETED
    [payment_source] => Array
        (
            [paypal] => Array
                (
                    [email_address] => sb-5jmpw15290534@personal.example.com
                    [account_id] => KWDHAEWH27644
                    [name] => Array
                        (
                            [given_name] => John
                            [surname] => Doe
                        )

                    [address] => Array
                        (
                            [country_code] => GT
                        )

                )

        )

    [purchase_units] => Array
        (
            [0] => Array
                (
                    [reference_id] => default
                    [amount] => Array
                        (
                            [currency_code] => USD
                            [value] => 1222.00
                        )

                    [payee] => Array
                        (
                            [email_address] => sb-0iekr20705814@business.example.com
                            [merchant_id] => 2ABZJT4Y5AGCA
                        )

                    [invoice_id] => server1|asdasdasdasd|1662466867
                    [soft_descriptor] => PAYPAL *TEST STORE
                    [payments] => Array
                        (
                            [captures] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => 38W81518X8267281B
                                            [status] => PENDING
                                            [status_details] => Array
                                                (
                                                    [reason] => PENDING_REVIEW
                                                )

                                            [amount] => Array
                                                (
                                                    [currency_code] => USD
                                                    [value] => 1222.00
                                                )

                                            [final_capture] => 1
                                            [seller_protection] => Array
                                                (
                                                    [status] => NOT_ELIGIBLE
                                                )

                                            [invoice_id] => server1|asdasdasdasd|1662466867
                                            [links] => Array
                                                (
                                                    [0] => Array
                                                        (
                                                            [href] => https://api.sandbox.paypal.com/v2/payments/captures/38W81518X8267281B
                                                            [rel] => self
                                                            [method] => GET
                                                        )

                                                    [1] => Array
                                                        (
                                                            [href] => https://api.sandbox.paypal.com/v2/payments/captures/38W81518X8267281B/refund
                                                            [rel] => refund
                                                            [method] => POST
                                                        )

                                                    [2] => Array
                                                        (
                                                            [href] => https://api.sandbox.paypal.com/v2/checkout/orders/3LM99742ND891473E
                                                            [rel] => up
                                                            [method] => GET
                                                        )

                                                )

                                            [create_time] => 2022-09-06T12:21:38Z
                                            [update_time] => 2022-09-06T12:21:38Z
                                        )

                                )

                        )

                )

        )

    [payer] => Array
        (
            [name] => Array
                (
                    [given_name] => John
                    [surname] => Doe
                )

            [email_address] => sb-5jmpw15290534@personal.example.com
            [payer_id] => KWDHAEWH27644
            [address] => Array
                (
                    [country_code] => GT
                )

        )

    [create_time] => 2022-09-06T12:21:08Z
    [update_time] => 2022-09-06T12:21:38Z
    [links] => Array
        (
            [0] => Array
                (
                    [href] => https://api.sandbox.paypal.com/v2/checkout/orders/3LM99742ND891473E
                    [rel] => self
                    [method] => GET
                )

        )

)

debug.log все приходит но баланс не изменяет