Valid Recurring Auth.net Subscription Expired On Member Site

I’m attempting to enable a new recurring auth.net subscription that has an initial 90 day trial and then is followed by a $2.95 monthly fee. I’m doing my initial testing with a sandbox auth.net account. Upon submitting the form I see an active subscription in authorize.net, but on the member site I’m seeing a message that my subscription has expired.

Similar one time purchase forms are working as expected, so it seems to be something specific to this recurring subscription. Comparing the accounts created for a recurring subscription to ones for a one time purchase I’ve noticed that the recurring user doesn’t have an EOT date explicitly set, but the one time purchase user does. Based on this KB article, I believe that this is to be expected and EOTs are handled dynamically for subscription profiles, but the fact that things work if I set the EOT explicitly for the recurring subscription user account has me wondering.

Here’s the shortcode I’m using:

[s2Member-Pro-AuthNet-Form level=“1” ccaps="" desc=“90 Days free / then $2.95 USD / Monthly (recurring charge, for ongoing access)” cc=“USD” custom=“mysite.com” success=“http://mysite.com/success/” ta=“0” tp=“90” tt=“D” ra=“2.95” rp=“1” rt=“M” rr=“1” rrt="" accept=“visa,mastercard,amex,discover” coupon="" accept_coupons=“0” default_country_code=“US” captcha=“0” /]

I’m new to s2Member, so apologies in advance if I’m missing something obvious. I’d be happy to provide any additional detail if it helps.

As I continue to look into this, I’m concerned that part of the issue might be problems accessing the silent post URL in my test environment. Does EOT for recurring subscriptions depend on this?

After walking through the subscription flow again with the debug log on I saw the following in s2-http-api-debug.log:

[url] => http://mytestsite/?s2member_paypal_notify=1
[response] => WP_Error Object
    (
        [errors] => Array
            (
                [http_request_failed] => Array
                    (
                        [0] => cURL error 28: Operation timed out after 20000 milliseconds with 0 bytes received
                    )

            )

        [error_data] => Array
            (
            )

    )

The page was taking an extremely long time to load before telling the user that their membership was expired - 20000 ms seems about right.

Also, why is it using a paypal proxy with auth.net? That seems odd.

More detailed debug info below:

LOG ENTRY: Thu Sep 7th, 2017 @ precisely 7:09 pm UTC

PHP v5.3.3 :: WordPress v4.8.1 :: s2Member v170722 :: s2Member Pro v170722
Memory 16.73 MB :: Real Memory 17.00 MB :: Peak Memory 16.88 MB :: Real Peak Memory 17.00 MB
mytestsite/your-complementary-membership/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Array
(
[state] => response
[transport_class] => Requests
[args] => Array
(
[method] => POST
[timeout] => 20
[redirection] => 5
[httpversion] => 1.1
[user-agent] => s2Member v170722; http://mytestsite
[reject_unsafe_urls] =>
[blocking] => 1
[headers] => Array
(
)

        [cookies] => Array
            (
            )

        [body] => Array
            (
                [txn_type] => subscr_signup
                [subscr_id] => 4755695
                [custom] => mytestsite
                [txn_id] => 4755695
                [period1] => 90 D
                [period3] => 1 M
                [mc_amount1] => 0.00
                [mc_amount3] => 2.95
                [mc_gross] => 0.00
                [mc_currency] => USD
                [tax] => 0.00
                [recurring] => 1
                [payer_email] => brian.perry@email.com
                [first_name] => Brian
                [last_name] => Perry
                [option_name1] => Originating Domain
                [option_selection1] => mytestsite
                [option_name2] => Customer IP Address
                [option_selection2] => 10.112.112.1
                [item_name] => 90 Days free / then $2.95 USD / Monthly (recurring charge, for ongoing access)
                [item_number] => 1
                [s2member_paypal_proxy] => authnet
                [s2member_paypal_proxy_use] => pro-emails
                [s2member_paypal_proxy_coupon] => Array
                    (
                        [coupon_code] => 
                        [full_coupon_code] => 
                        [affiliate_id] => 
                    )

                [s2member_paypal_proxy_verification] => f2c48cde3fab742267b851eea3dec3e7
                [s2member_paypal_proxy_return_url] => http://mytestsite/success/
            )

        [compress] => 
        [decompress] => 1
        [sslverify] => 
        [sslcertificates] => /var/www/html/wordpress/wp-includes/certificates/ca-bundle.crt
        [stream] => 
        [filename] => 
        [limit_response_size] => 
        [s2member] => 170722
        [_redirection] => 5
    )

[url] => http://mytestsitel/?s2member_paypal_notify=1
[response] => WP_Error Object
    (
        [errors] => Array
            (
                [http_request_failed] => Array
                    (
                        [0] => cURL error 28: Operation timed out after 20000 milliseconds with 0 bytes received
                    )

            )

        [error_data] => Array
            (
            )

    )

)

I don’t know anything about Authorize.net because I have never used it. But I have just done a quick grep of the s2Member code, and it’s clear that the ?s2member_paypal_notify=1 parameter is used for all of the payment processors. I think it’s just a way of avoiding having to replicate the same functionality for each one.

I also know that, when I first set up Stripe on my localhost test installation, it didn’t work properly because Stripe couldn’t make the connection it needed to my localhost site. When I moved to a server with my host, there were no problems. So you need to make sure that your site is available for the payment processor to connect to.