Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-5269

Stripe Payments: error when running cron

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.12.0-b2
    • Component/s: None
    • Labels:
      None

      Description

      We have received multiple reports of people encountering the following error when the cron is run

      Error Response: A return_url must be specified because this Payment Intent is configured to automatically accept the payment methods enabled in the Dashboard, some of which may require a full page redirect to succeed.
      If you do not want to accept redirect-based payment methods, set
      automatic_payment_methods[enabled] to true and automatic_payment_methods[allow_redirects] to never when creating Setup
      Intents and Payment Intents.

      Sounds like there are a couple more parameters that need to be set in order to process these properly

        Activity

        jonathan Jonathan Reissmueller created issue -
        jonathan Jonathan Reissmueller made changes -
        Field Original Value New Value
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Summary Stripe Payments Stripe Payments: error when running cron
        Hide
        admin Paul Phillips added a comment -

        May be related to special cards with security features, like those issued by Klarna

        Show
        admin Paul Phillips added a comment - May be related to special cards with security features, like those issued by Klarna
        Hide
        admin Paul Phillips added a comment -

        This may be a "buy now pay later" kind of scheme, see https://docs.stripe.com/payments/buy-now-pay-later In this case, it would seem really unusual to be able to process this on an automated basis. All of the options say they don't support a subscription except for a private preview for Klarna.

        Show
        admin Paul Phillips added a comment - This may be a "buy now pay later" kind of scheme, see https://docs.stripe.com/payments/buy-now-pay-later In this case, it would seem really unusual to be able to process this on an automated basis. All of the options say they don't support a subscription except for a private preview for Klarna.
        admin Paul Phillips made changes -
        Attachment stripe-buynowpaylater.png [ 13013 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5 [ 204 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        jonathan Jonathan Reissmueller made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        jonathan Jonathan Reissmueller made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5 [ 204 ] 5.11.0 Sprint 5, 5.11.0 Sprint 6 [ 204, 206 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        admin Paul Phillips made changes -
        Fix Version/s 5.11.0-b2 [ 12204 ]
        Fix Version/s 5.11.0-b1 [ 11908 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5, 5.11.0 Sprint 6 [ 204, 206 ] 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7 [ 204, 206, 207 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        admin Paul Phillips made changes -
        Fix Version/s 5.11.0 [ 12200 ]
        Fix Version/s 5.11.0-b2 [ 12204 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7 [ 204, 206, 207 ] 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.12.0 Sprint 1 [ 204, 206, 207, 208 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8 [ 204, 206, 207, 208 ] 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 1 [ 204, 206, 207, 208, 212 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        admin Paul Phillips made changes -
        Fix Version/s 5.11.0 [ 12205 ]
        Fix Version/s 5.11.0-b3 [ 12200 ]
        admin Paul Phillips made changes -
        Fix Version/s 5.11.1 [ 12201 ]
        Fix Version/s 5.11.0 [ 12205 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 1 [ 204, 206, 207, 208, 212 ] 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 1, 5.12.0 Sprint 1.5 [ 204, 206, 207, 208, 212, 213 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Fix Version/s 5.11.2 [ 12207 ]
        Fix Version/s 5.11.1 [ 12201 ]
        admin Paul Phillips made changes -
        Fix Version/s 5.11.3 [ 12209 ]
        Fix Version/s 5.11.2 [ 12207 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 1, 5.11.1 Sprint 1 [ 204, 206, 207, 208, 212, 213 ] 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 2, 5.12.0 Sprint 1, 5.11.1 Sprint 1 [ 204, 206, 207, 208, 209, 212, 213 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        admin Paul Phillips made changes -
        Fix Version/s 5.12.0-b2 [ 12210 ]
        Fix Version/s 5.11.3 [ 12209 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 2, 5.12.0 Sprint 1, 5.11.1 Sprint 1 [ 204, 206, 207, 208, 209, 212, 213 ] 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 2, 5.12.0 Sprint 3, 5.12.0 Sprint 1, 5.11.1 Sprint 1 [ 204, 206, 207, 208, 209, 210, 212, 213 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 2, 5.12.0 Sprint 3, 5.12.0 Sprint 1, 5.11.1 Sprint 1 [ 204, 206, 207, 208, 209, 210, 212, 213 ] 5.11.0 Sprint 5, 5.11.0 Sprint 6, 5.11.0 Sprint 7, 5.11.0 Sprint 8, 5.12.0 Sprint 2, 5.12.0 Sprint 1, 5.11.1 Sprint 1, 5.12.0 Sprint 4 [ 204, 206, 207, 208, 209, 212, 213, 214 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        Show
        admin Paul Phillips added a comment - Klana test information here https://docs.stripe.com/payments/klarna/accept-a-payment?web-or-mobile=web&payment-ui=stripe-hosted&country=united-states#test-integration
        Hide
        jonathan Jonathan Reissmueller added a comment -

        CORE-5325 made a change that resolves this issue in the cron.

        
                if ($customer_present) {
                    unset($charge['off_session']);
                } else {
                    unset($charge['payment_method_options']);
                }
        

        To

        
                if ($customer_present) {
                    unset($charge['off_session']);
                } else {
                    unset($charge['payment_method_options']);
                    $charge['automatic_payment_methods'] = ['enabled' => true, 'allow_redirects' => 'never'];
                }
        

        There may still be issues with redirect based payment methods like klarna, banconnect, etc. These do not support automated charges so we don't need to worry about that, but they also likely won't work in the checkout flow so we may want to consider implementing support for them at some point

        Show
        jonathan Jonathan Reissmueller added a comment - CORE-5325 made a change that resolves this issue in the cron. if ($customer_present) { unset($charge['off_session']); } else { unset($charge['payment_method_options']); } To if ($customer_present) { unset($charge['off_session']); } else { unset($charge['payment_method_options']); $charge['automatic_payment_methods'] = ['enabled' => true , 'allow_redirects' => 'never']; } There may still be issues with redirect based payment methods like klarna, banconnect, etc. These do not support automated charges so we don't need to worry about that, but they also likely won't work in the checkout flow so we may want to consider implementing support for them at some point
        jonathan Jonathan Reissmueller made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile