• Resolved jy313

    (@jy313)


    I did install the plugin, and configured manually the PayPal acount details, but when I click pay via PayPal, I get this error :

    “Something went wrong. Please try again or choose another payment source”

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter jy313

    (@jy313)

    Also when I try to connect my PayPal automatically I get this error :

    “We could not complete the onboarding process. Some features, such as card processing, will not be available. To fix this, please try again.”

    Thread Starter jy313

    (@jy313)

    Log : 2021-09-26T21:01:37+00:00 WARNING [Error] Unknown error while connecting to PayPal.

    Thread Starter jy313

    (@jy313)

    Update : I can link the paypal account to the plugin, if i change the browser.
    But i still get the error at the chekout if there is more than one product in the cart :

    “Something went wrong. Please try again or choose another payment source”

    Log :

    2021-09-27T07:35:02+00:00 CRITICAL Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, null given in /home/domainename/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php:320

    In class-purchaseunit.php:320 :

    "$fee_items_total = round( $fee_items_total, 2 );"

    • This reply was modified 3 years, 5 months ago by jy313.
    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @jy313

    can you please provide the full logs; we believe this could be related to a known issue (regarding token creation/vaulting), but we need more logs to confirm that.

    If you don’t feel comfortable sharing these on an open forum, you can also open a service desk ticket with us via these instructions: https://paypal.inpsyde.com/docs/request-support/

    Thank you.
    Joost

    Thread Starter jy313

    (@jy313)

    Thank you @joostvandevijver For your answer,

    This is My Log of Today :

    2021-09-27T07:49:29+00:00 CRITICAL Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, null given in /home/domainname/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php:320
    Stack trace:
    #0 /home/domainname/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php(320): round()
    #1 /home/domainname/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php(267): WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit->ditch_items_when_mismatch()
    #2 /home/domainname/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-order.php(222): WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit->to_array()
    #3 [internal function]: WooCommerce\PayPalCommerce\ApiClient\Entity\Order::WooCommerce\PayPalCommerce\ApiClient\Entity\{closure}()
    #4 /home/domainname/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-order.php(224): array_map()
    #5 /home/domainname/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php(190): WooCommerce\PayPalCommerce\ApiClient\Entity\Order->to_array()
    #6 /home/domainname/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/class-buttonmodule.php(150): WooCommerce\PayPalCommerce\Button\Endpoint\CreateOrderEndpoint->handle_request()
    #7 /home/domainname/public_html/wp-includes/class-wp-hook.php(303): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}()
    #8 /home/domainname/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #9 /home/domainname/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
    #10 /home/domainname/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(90): do_action()
    #11 /home/domainname/public_html/wp-includes/class-wp-hook.php(303): WC_AJAX::do_wc_ajax()
    #12 /home/domainname/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #13 /home/domainname/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
    #14 /home/domainname/public_html/wp-includes/template-loader.php(13): do_action()
    #15 /home/domainname/public_html/wp-blog-header.php(19): require_once('/home/domainname/...')
    #16 /home/domainname/public_html/index.php(17): require('/home/domainname/...')
    #17 {main}
      thrown in /home/domainname/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php on line 320

    Thank You in advance.

    • This reply was modified 3 years, 5 months ago by jy313.
    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @jy313

    Thanks for your message. This is related to a known issue; I will link your case under the same bug. For previous reports of this issue we gave the following advice:

    Support for WooCommerce Subscriptions is integrated through PayPal vaulting, which creates a token for the payment method upon purchase.
    The vaulting API however, currently does not support zero-sum checkouts to create new tokens. This means when no payment occurs, then payment methods cannot be saved. To work around this behaviour there are currently only two options:

    You could either create a small sign-up fee, which will result in a first payment and the creation of a token that can be reused for later payments/renewals.

    Alternatively, WooCommerce Subscriptions has a feature that can allow zero-sum checkouts without adding any payment options to the subscription:

    But this feature may allow trial abuse if not combined with any other measures.

    As far as I know, PayPal is working on adding support for zero-sum checkouts in the Vaulting API, but we don’t have any timeline as to when the feature could be available. We are looking at alternate ways to make this happen by potentially performing a small charge with a subsequent refund, but in our view, it’s not a reliable approach.
    In any case, we want this feature to be available and will include it in the plugin as soon as we found a good way to pull it off.

    Let me know if this explains the situation for you and provides enough guidance to get to a solution.

    Kind regards,
    Joost`

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Something went wrong’ is closed to new replies.