• Resolved Art Project Group

    (@artprojectgroup)


    The latest version doesn’t allow payment and returns these errors when trying to open the modal:

    create_order_error {err: "Cannot read properties of undefined (reading '0')", timestamp: '1687973420889', referer: 'www.paypal.com', sdkCorrelationID: 'f476262f635df', sessionID: 'uid_1629e04dd5_mtc6mjk6mji',?…}
    
    TypeError: Cannot read properties of undefined (reading '0')
        at https://www.xxx.com/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/assets/js/button.js:2:96194
    
    Error: Cannot read properties of undefined (reading '0')
        at Fr.error (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:130538)
        at Object.<anonymous> (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:138916)
        at JSON.parse (<anonymous>)
        at Gr.o (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:138775)
        at Gr (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:138928)
        at u.on (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:143497)
        at no (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:143617)
        at https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:149941
        at e.try (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:77480)
        at https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:149738
    
    Error: Cannot read properties of undefined (reading '0')
        at Fr.error (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:130538)
        at Array.<anonymous> (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:138916)
        at JSON.parse (<anonymous>)
        at Gr.o (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:138775)
        at Gr (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:138928)
        at u.on (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:143497)
        at no (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:143617)
        at https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:149941
        at e.try (https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:77480)
        at https://www.paypal.com/sdk/js?client-id=AX6dU_n546a-ssL12cZhmeyq3xa1AGxEgtdUSrZR4jThMWwBRuk1AxYE3tsJlXjM4ux9rI0mqE6bk7WM&currency=EUR&integration-date=2023-06-02&components=buttons,funding-eligibility,messages&vault=true&commit=true&intent=capture&disable-funding=sofort,paylater&enable-funding=venmo:3:149738

    Best regards.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @artprojectgroup

    From this JavaScript error alone, it’s not easy to judge what the problem could be.

    You may see more relevant details when checking the plugin log files or the Network tab in the browser dev tools. In the latter, the call to ?wc-ajax=ppc-create-order after clicking the PayPal button may display in red, potentially including additional information about the failure, like a PayPal response. But it depends on where the failure occurs.

    We can better judge it if you could provide a URL to the site while version 2.1.0 is active. You can also share a link to the site privately with the support team. If you send a private message, please include a link to this thread. Thanks!

    Kind regards,
    Niklas

    Thread Starter Art Project Group

    (@artprojectgroup)

    {"success":true,"data":{"id":"79K5231006312333E","custom_id":""}}
    2023-06-28T18:20:08+00:00 DEBUG POST https://api.paypal.com/v1/oauth2/token?grant_type=client_credentials
    Response Debug ID: 462ad96808776
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    
    2023-06-28T18:20:10+00:00 DEBUG GET https://api.paypal.com/v1/customer/partners/K8SKZ36LQBWXJ/merchant-integrations/ZY4ZS58H7YAHE
    Response Debug ID: 2bfbd11810c02
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    2023-06-28T18:20:14+00:00 DEBUG GET https://api.paypal.com/v1/notifications/webhooks
    Response Debug ID: d75ae3730b3c3
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    
    2023-06-28T18:20:23+00:00 DEBUG POST https://api.paypal.com/v2/checkout/orders
    Request Body: {"intent":"CAPTURE","purchase_units":[{"reference_id":"default","amount":{"currency_code":"EUR","value":"39.99","breakdown":{"item_total":{"currency_code":"EUR","value":"33.05"},"shipping":{"currency_code":"EUR","value":"0.00"},"tax_total":{"currency_code":"EUR","value":"6.94"}}},"description":"","items":[{"name":"BGee masajeador de suelo p\u00e9lvico","unit_amount":{"currency_code":"EUR","value":"33.05"},"quantity":1,"description":"BGee Classic es un un vibrador masajeador personal de dise\u00f1o manejable y ergon\u00f3mico que cuenta con 5 patrones de vibraci\u00f3n (","sku":"201040","category":"PHYSICAL_GOODS"}],"payee":{"merchant_id":"ZY4ZS58H7YAHE"},"shipping":{"name":{"full_name":" "},"address":{"country_code":"ES","address_line_1":"nada","admin_area_1":"MA","admin_area_2":"nada","postal_code":"29651"}}}],"application_context":{"user_action":"PAY_NOW","shipping_preference":"SET_PROVIDED_ADDRESS","landing_page":"LOGIN","locale":"es-ES","brand_name":"En Suelo Firme","return_url":"https:\/\/www.xxx.com\/?wc-ajax=ppc-return-url","cancel_url":"https:\/\/www.xxx.com\/pago\/"},"payer":{"email_address":"[email protected]","name":{"given_name":"nada","surname":"nada"},"address":{"country_code":"ES","address_line_1":"nada","admin_area_1":"MA","admin_area_2":"nada","postal_code":"29651"},"phone":{"phone_type":"HOME","phone_number":{"national_number":"123456789"}}},"payment_method":{"payee_preferred":"UNRESTRICTED","payer_selected":"PAYPAL"}}
    Response Debug ID: ddda1538b8bcd
    Response: Array
    (
        [code] => 201
        [message] => Created
    )
    

    Best regards.

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @artprojectgroup

    Based on the log entry you provided, it seems the issue isn’t originating at PayPal but potentially lies on the plugin level.

    For a more precise diagnosis, our team would benefit from directly investigating the website displaying this behavior. Doing so would help us understand the conditions leading to this error and provide you with the most effective recommendations.

    Is it possible to set up a temporary clone of your site with the plugin updated? This would allow us to observe the issue without disrupting your live site’s availability.

    Looking forward to your response.

    Kind regards,
    Niklas

    Thread Starter Art Project Group

    (@artprojectgroup)

    Of course, give us an e-mail address to which we can send you the login information.

    Best regards.

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi?@artprojectgroup

    While we are unable to directly share an email address, we encourage you to share a copy of the WooCommerce system report of your test site. This will allow us to observe the checkout page behavior in question. You can provide the system report when creating a support ticket, which can be done either from here (account required) or from here (no account required).

    Thanks!

    Kind regards,
    Niklas

    Thread Starter Art Project Group

    (@artprojectgroup)

    The test site isn’t public.

    We’ve sent you a ticket.

    Best regards.

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Since we haven’t heard back from you recently, we’ll mark this thread as resolved. But if you need further assistance or would like to share additional information like the requested .HAR file, please get back to us via the private support request.

    Thank you!

    Thread Starter Art Project Group

    (@artprojectgroup)

    Sorry, we were on vacation.

    Sent the test with the new version 2.2.0.

    Thank you very much.

    Best regards.

    Thread Starter Art Project Group

    (@artprojectgroup)

    Fixed adding this code to our functions.php:

    add_filter( 'woocommerce_paypal_payments_basic_checkout_validation_enabled', '__return_true' );

    Best regards.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Unable to pay with version 2.1.0’ is closed to new replies.