When trying to "subscribe" to a paid plan with PayPal API - "Cannot perform the action. Please report."

When trying to "subscribe/rent" to a plan (not "buy"), and using Paypal api - a popup appears saying "cannot perform the action. Please report.".

image_transcoder.php?o=bx_froala_image&h=5136&dpx=1&t=1622192272
  • 2630
  • More
Replies (8)
    • Hello titanium !

      You need to provide us the latest lines from the log/sys_payment.log file.

      • Hi, here are the paypal-related lines.

        May 28 08:57:12 [85] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Token:

        May 28 08:57:12 [85] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Product:

        May 28 08:57:12 [85] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Token:

        May 28 08:57:12 [85] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Create Product:

        May 28 08:57:36 [85] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Token:

        May 28 08:57:36 [85] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Product:

        May 28 08:57:36 [85] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Token:

        May 28 08:57:36 [85] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Create Product:

        May 28 08:59:04 [14] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Token:

        May 28 08:59:04 [14] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Product:

        May 28 08:59:04 [14] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Token:

        May 28 08:59:04 [14] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Create Product:

        May 28 09:02:57 [14] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Token:

        May 28 09:02:57 [14] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Product:

        May 28 09:02:57 [14] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Get Token:

        May 28 09:02:57 [14] /m/payment/subscribe_json/r=payment/subscribe_json/ :

        [paypal_api] Create Product:

        • I am having this same issue.
          I have the Credits module installed as well.
          If a member goes to https://domain.com.au/page/acl-view and if I only have "PAYPAL
          PayPal payment provider" active (not the API) then the option to buy with paypal does not appear and it forces users to by Credits (with paypal) and that work-around works.
          If I try activate the API (which works fine in Sandbox mode) it fails in Live mode with that same error as above.

          • Leonidis there appears to be a coding issue since the last update.

            Paypal no longer works with memberships.
            I tried Stripe instead and the Stripe portal shows this error:

            resource_missing - line_items[0][price]

            The value you passed into the price field does not look like a price token. Are you sure you passed in a valid token for a price you created?

            If you are trying to reference a price object please visit our guide on creating prices to learn more.

            Otherwise, if you are trying to pass a raw amount you can use the price_data field to create prices inline.

            Below ""price": 

            "basic-1-year" appears in red in the logs implying that the coding is returning the name of the product instead of price.
            {
            "payment_method_types": {
            "0": "card"
            },
              "customer_email": "cr0atz@XXXXXXXX.com",
            "line_items": {
            "0": {
                  "price": 
            "basic-1-year"
            ,
             
             "quantity": "1"
             
             }
             
             },
             
             "mode": "subscription",

            • With Paypal (Non-API) it works with Shopping Cart.
              Stripe does not.
              Paypal API version produces this error

              Fatal error: Uncaught PayPalHttp\HttpException: {"error":"invalid_client","error_description":"Client Authentication failed"} in /home/XXXcom/public_html/plugins/paypal/paypal/paypalhttp/lib/PayPalHttp/HttpClient.php:215 Stack trace: #0 /home/XXXcom/public_html/plugins/paypal/paypal/paypalhttp/lib/PayPalHttp/HttpClient.php(100): PayPalHttp\HttpClient->parseResponse(Object(PayPalHttp\Curl)) #1 /home/XXXcom/public_html/plugins/paypal/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AuthorizationInjector.php(37): PayPalHttp\HttpClient->execute(Object(PayPalCheckoutSdk\Core\AccessTokenRequest)) #2 /home/XXXcom/public_html/plugins/paypal/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AuthorizationInjector.php(29): PayPalCheckoutSdk\Core\AuthorizationInjector->fetchAccessToken() #3 /home/XXXcom/public_html/plugins/paypal/paypal/paypalhttp/lib/PayPalHttp/HttpClient.php(64): PayPalCheckoutSdk\Core\AuthorizationInjector->inject(Object(PayPalCheckoutSdk\Orders\OrdersCreateRequest)) #4 /home/flastcom/public_htm in /home/XXXcom/public_html/plugins/paypal/paypal/paypalhttp/lib/PayPalHttp/HttpClient.php on line 215

              • Hello cr0atz !

                Well, the error like this one:

                Fatal error: Uncaught PayPalHttp\HttpException: {"error":"invalid_client","error_description":"Client Authentication failed"}

                looks like the called by the wrong access parameters like Client ID/Secret. Try to check it again.

                • I have tried that still get the same error "Cannot perform the action. Please report.".   I have checked with paypal they confirm I have the right public and private keys so they say its a developer problem.

                  • Hello 

                    I think "Cannot perform the action. Please report." error appears because of a bug which was already fixed here: 'PHP errors on Purchase Membership page when PayPal API provider is used.' Fix should be released with the next UNA update. To be sure, you may apply it manually and test.

                    If you don't want to modify the PHP code you may also try to add a Description for membership level you are selling in Studio -> Permissions -> Levels -> edit a level.

                    Login or Join to comment.