Support » Plugin: Leaky Paywall » 3D Secure not working with Stripe registration form

  • Resolved pjkarlsen

    (@pjkarlsen)


    Dear Jeremy and colleagues:

    Thank you for your excellent subscription plugin.

    With the new SCA regulations, we are currently experiencing an issue with 3D Secure for some users. 3D Secure is occasionally triggered by the user’s bank when a new subscriber signs up for an annual subscription for the first time.

    The subscriber gets (temporary) access to our premium content, but the payment is categorized as INCOMPLETE by Stripe, and Stripe logs the following events when a payment fails:
    – Payment requires a verification step by user
    – Payment failed
    – The payment requires you to take action in order to complete the payment

    We are running an adapted older version of Leaky Paywall (4.14.3) on WordPress 5.6 with the Stripe registration form and Stripe API version 2020-03-02. We are in the process of updating our adapted version of the plugin on our staging site.

    Currently, we are trying to locate which exact Leaky Paywall files need to be updated, at a minimum, for 3D Secure to be correctly triggered.

    We have previously made our own adaptions in the following five files:
    Class-leaky-paywall-gateways.php
    Class-leaky-paywall-gateway-stripe.php
    Functions.php
    Registration-functions.php
    Shortcodes.php

    Two further, related questions:

    1. Do we need to add or change any Stripe events besides the ones listed here for 3D Secure to work correctly:
    https://docs.zeen101.com/article/120-leaky-paywall-recurring-payments

    2. Is Leaky Paywall compatible with the latest Stripe API version (2020-08-27)?

    Thank you so much for your patience, time and effort.

    Best,
    Paul Karlsen

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Jeremy Green

    (@endocreative)

    Hi Paul,
    I can confirm our SCA integration works in the latest version of Leaky Paywall. We can’t guarantee support on old versions of Leaky Paywall.

    Thread Starter pjkarlsen

    (@pjkarlsen)

    Thank you, Jeremy! 🙂

    Thread Starter pjkarlsen

    (@pjkarlsen)

    Dear Jeremy,

    We are still struggling a bit to make the SCA/3D Secure integration work for Leaky Paywall <> Stripe. Would you be able to point us in the right direction?

    We are currently testing Leaky Paywall version 4.15.8 on our staging site: https://psykologisk.no/stage3/bli-abonnent/

    When registering a new account with a Stripe test card, the user gets the Leaky Paywall error message: “There was an error with your payment. Please try again.”

    However, if we revert to an older version (v4.14.3) of a single file, “class-leaky-paywall-payment-gateway-stripe.php”, the user gets access to the account page, but the payment is incomplete and Stripe provides the event messages:
    – Payment requires a verification step by user
    – Payment failed
    – The payment requires you to take action in order to complete the payment

    Our site is currently running on WordPress 5.6 with the Stripe registration form and Stripe API version 2020-03-02.

    Thank you for your time and consideration. Wishing you a great day! 🙂

    Best,
    Paul

    Plugin Contributor Jeremy Green

    (@endocreative)

    Thanks for the info Paul. We’ll do some testing on our end and see if we can replicate the problem. I’ll let you know what we find.

    Thread Starter pjkarlsen

    (@pjkarlsen)

    Thank you for being so helpful! We are looking forward to making our Leaky Paywall solution work beautifully with 3D Secure.:)

    Plugin Contributor Jeremy Green

    (@endocreative)

    It looks like any admin ajax requests by Leaky Paywall on your registration page are returning a 302 redirect. That is the problem, as all my local tests with your settings are working fine with 3D Secure. Usually this is related to a theme or plugin that is redirecting without checking for DOING_AJAX. Please see this thread:

    https://stackoverflow.com/questions/9408334/wordpress-admin-ajax-results-in-error-302-redirect

    Thread Starter pjkarlsen

    (@pjkarlsen)

    Thank you for your time and effort, Jeremy. We look forward to investigating further.

    Thread Starter pjkarlsen

    (@pjkarlsen)

    Dear Jeremy,

    Thank you for your patience and for helping us solve the 302 redirect issue.

    On our staging site (https://psykologisk.no/stage5/bli-abonnent/) there seems to be one more issue that causes a fatal error, right at the end of the registration process following payment success.

    We seem to have a conflict within the Leaky Paywall Trials plugin. If the plugin is active, we get a fatal error. If we deactivate this plugin, the registration process works.

    The problem seems to be a filter (filter_gateway_data_after_stripe) in line 108 in the function.php file. Is there a simple way to change the code?

    Here is the code:

    /**
    * Process trial data returned from Stripe response before creating subscriber
    */
    add_filter( ‘leaky_paywall_stripe_gateway_data’, ‘filter_gateway_data_after_stripe’, 10, 4 );
    function filter_gateway_data_after_stripe( $gateway_data, $object, $customer, $subscription ) {

    if ( $subscription && ‘trialing’ == $subscription->status ) {
    $gateway_data[‘payment_status’] = ‘trial’;
    $gateway_data[‘trialing_until’] = $subscription->trial_end;
    $gateway_data[‘expires’] = date( ‘M j, Y’, $subscription->trial_end );
    }

    return $gateway_data;

    }

    Here is the error message from WordPress Debug Mode:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function filter_gateway_data_after_stripe(), 3 passed in /wp-includes/class-wp-hook.php on line 287 and exactly 4 expected in /wp-content/plugins/leaky-paywall-trials/functions.php:108 Stack trace: #0 /wp-includes/class-wp-hook.php(287): filter_gateway_data_after_stripe(Array, Object(Leaky_Paywall_Payment_Gateway_Stripe), Object(Stripe\Customer)) #1 /wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array) #2 /wp-content/plugins/leaky-paywall/include/gateways/class-leaky-paywall-payment-gateway-stripe.php(107): apply_filters(‘leaky_paywall_s…’, Array, Object(Leaky_Paywall_Payment_Gateway_Stripe), Object(Stripe\Customer)) #3 /wp-content/plugins/leaky-paywall/include/gateways/gateway-functions.php(64): Leaky_Paywall_Payment_Gateway_Stripe->process_signup() in /wp-content/plugins/leaky-paywall-trials/functions.php on line 108

    Thank you in advance.

    Plugin Contributor Jeremy Green

    (@endocreative)

    Please make sure you using the latest version of our Trials add-on. Currently that is 1.7.0. That error is from on older version of the add-on.

    https://zeen101.com/downloads/leaky-paywall-trials/

    Thread Starter pjkarlsen

    (@pjkarlsen)

    Thank you, the issue has been solved.:)

    • This reply was modified 2 weeks, 4 days ago by pjkarlsen.
    Plugin Contributor Jeremy Green

    (@endocreative)

    Happy to help!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.