Problem with Pro Sites and Stripe subscription and coupon

I am beginning to think that it may be less time consuming to stop using Pro Sites and manually handle the systems! Today's problem is site #830 . With all of the problems I have had in the past with PayPal, I've been phasing it out for new subscriptions. The user on site 830 previously tried to update her account in the back-end and use a credit card and it didn't work. I then canceled the PayPal subscription in the PayPal back-end and then created a coupon for this user so that she would continue with old pricing and proceed in Stripe. Stripe received the payment and created a subscription but the coupon did not process (So I then created a coupon in the back-end of Stripe to apply for the future payments and refunded the difference ($10) of her first subscription payment.
HOWEVER, IN THE PRO SITES DASHBOARD HISTORY IT IS SHOWING THE NEW STRIPE TRANSACTION BUT THE PRO SITES ACCOUNT IS NOT SHOWING THE NEW SUBSCRIPTION AND HAS NOT EXTENDED!

  • antKat

    This site #830 processed a payment on 12/24/17 Stripe gateway. In this case, the original gateway had been Paypal. It was changed to Stripe on 10/24/2017. However, the Pro Sites back-end under Subscription payments it says "The Subscription Has Been Cancelled in PayPal"
    The history shows the Stripe payment on 12/24/17 so there is a disconnect.
    I need this fixed ASAP!

    What I am also finding in Stripe is that if someone updates a credit card, the existing subscription is not edited or deleted in Stripe but a new one gets created amounting to 2 active subscriptions in Stripe.

    I have extended the support access for this network.

  • Panos

    Hi antKat ,

    Does this happen only for this specific blog id? It could be related to the way it was set to Stripe.

    It was changed to Stripe on 10/24/2017.

    How was it changed? It is important that Stripe's plan contains the specific information for blog id, level and period. It seems that the blog id is correct since the log shows records of that transaction.

    I would suggest to first check the Stripe plan if all is good there. To check this you need to:

    1. Get customer id. Since the stripe gateway hasn't been set in the pro-sites table for that blog id, there is no direct link to stripe customer page, but you can get customer id from logs:

    2. Go to Stripe page and search for that customer id:

    3. Once the custome page loads scroll to the Active Subscriptions section and click on the subscription to open plan details.

    4. In the page that opens check if the Metadata section contains correct information :

    Please let us know if everything seems ok in your stripe subscription.

    I would also like to have a closer look and do some testing blogs. I checked the admin credentials and worked but could not connect with ftp credentials. Could you please send them once more? You can send that privately through our contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:Subject: "Attn: Panos Lyrakis"

    - FTP credentials
    host
    username
    password
    (and port if required)

    - link back to this thread for reference

    IMPORTANT
    Please do not share here any screenshot or text containing such private information as my screenshots do. I am sharing since they are from testing accounts.

    Kind regards!

  • antKat

    Hi Panos, thank you for your help.
    1. It was set to Stripe from the user's account page. I currently no longer offer PayPal and only offer Stripe for all new subscriptions. For this particular site, the original gateway had been PayPal which the user needed to update. Since we no longer provided PayPal, the user had been cancelled on 9/19/2017. On 10/24/2017, the user re-subscribed on her account page to the Stripe gateway. Because pricing had changed, I had also prepared a coupon using the ProSites. When the subscription was created at Stripe, the coupon did not work so I created one for the new subscription in the Stripe back-end. The subscriber is currently being charged the correct amount with the Stripe back-end coupon added. As I previously stated, the payments are showing in the history but ProSites does not extend and I've had to manually extend every month.

    I went to stripe to check the meta on the subscription as you requested and it is correct.

    I do not have this specific problem on any other sites at the moment. However, I have found that when a subscriber needs to update credit card info for existing sites, rather than just updating the cc information, a new subscription is created but the original doesn't get cancelled, and the subscriber is getting double charged.

    I don't know if the following info will give a clue but I just checked the last 10 sites and found that 7/10 state under the Subscription Info: "This Site is using different gageway so information is not available." This is also the case on the site in question #830. Why is this info stating a "different gateway" when it is Stripe? Strange!

    I am re-sending you the credentials via private message.

  • Panos

    Hey antKat ,

    Thanks for re-sending :slight_smile: I had to modify (add domain to username etc)
    in order to make them work, which I missed doing in the first ones you had sent.

    In my test site I created a test blog with PayPal, then I force withdraw-ed it and sent a test webhook request similar to the one Stripe sends. It extended the blog and set the gateway to stripe.

    Could you do some digging in Stripe dashboard regarding this? It's important to see what has been sent in the webhook request from Stripe. You can go to the Payments page and locate that specific payment. Click on it and scroll to the Logs section:

    Click on the latest log. There should be a Response body section. Could you please copy that and send it privately similar to how you sent the ftp info?

    I am interested to what is being missed there.

    I noticed some cases with this message :

    This site is using a different gateway so their information is not accessible.

    on your site. In the Pro Site logs it contains info about:

    Stripe webhook "customer.subscription.updated" received.

    There is no log for completed payment. Could you please confirm that these have been paid in Stripe Dashboard? Could you also include the logs of one of those blogs to your email? For example for blog id 899?

    If they ar paid we can add that info using this script I prepared here:
    https://gist.github.com/wpmudev-sls/72925d1b7e677843c2db421b8d13f9a9

    But we need to be sure if they are actually paid and if they are paid why the complete status request has not been sent.

    Thanks!

  • Panos

    Hi antKat ,

    Sincere apologies for such a delay here!

    The log info you have sent seems correct. Also Customer and Subscription information is stored in db for blog_id 830. What was missing was that the gateway was not updated in pro_sties table for blog 830. I'm not sure why it wasn't, in all my test in my testing sites the gateway was updated to stripe.

    You can check the admin page of that blog which seems to include all information of stripe:
    yoursite.com/wp-admin/network/admin.php?page=psts&bid=830

    Are you aware of any other blogs with similar issues?

    Thanks!

  • antKat

    Hi Panos,
    Its been awhile and YES I still have problems. Blog ID #445 has been changed from PayPal to Stripe. Stripe is showing successful payments but the blog description is still showing PayPal cancelled and site will expire tomorrow!

    As I mentioned on my previous thread to you as an answer regarding the issue of "This Site is using different gageway so information is not available." Many of the Stripe accounts are showing this.

    I have lost customers regarding the issues of ProSites and the problems. There should be a trustworthy, efficient method to create and update accounts. My customers not being able to simply update their credit card information has been extremely problematic.

    In addition, on Feb 2 you provided me with a link to a script for Pro Sites, however, I need instructions on how to install and use (once payments are verified).

  • Panos

    Hi antKat ,

    The same as blog_id 830 happened. I have updated the pro_sites table and set gateway to Stripe for blog_id 445.

    The gateway chosen upon payment is stored as the gateway of the blog. When it accepts a payment request from another gateway, in this case from Stripe, it does store the information, but it doesn't change the gateway in the pro_sites table. It sounds bit risky thing to do in gateway files. Perhaps adding some custom option for this would be better.

    Are there any other cases you are aware of that have changed payment methods? If so I could possibly create a mu-plugin that would allow to switch gateways.

    Kind regards!

  • antKat

    Hi Panos,
    Because of all the problems I had had with PayPal (either double extending or not extending ProSites) and I was losing substantial money, I have been phasing out of PayPal. There are still 30 customers still on PayPal but when they want to update they only have the option for Stripe so the mu-plugin would be helpful.

    I still have to open up many Pro-Sites accounts to see which sites do not have the Stripe descriptions.

    I now encountered another problem on Site 739. I have a previous customer on the Stripe gateway that had cancelled her site a few months back. She now wanted to come back. Since her site was not yet deleted, she authorized me to reactivate her Stripe account. Unfortunately it did not work as intended. Stripe is showing re-activation but at the wrong price. Her previous subscription was $29.99 and it charged her $22.00. (I currently chardge $39.99 but I was willing to keep her at the old pricing but now it is $7.99 less!). On the ProSites dashboard, it is showing the payment for today 4/10/2018 but it is showing the expiration date also as 4/10/2018!!!

  • Panos

    Hi antKat ,

    I have added a new mu-plugin :
    wp-content/mu-plugins/ps-set-blogs-gateway.php

    It adds a new option in the Pro Sites Management page of blogs that allows to change the gateway. If you do not need it at this point please rename that file to ps-set-blogs-gateway.php.txt.

    If I uderstand correctly, regarding blog id 739, you want it to use the old plan it used to have. Unfortunately, since this log cancelled it can only have one of the current existing plans. If they have been changed, then their subscription will use the changed prices of the plan.

    Only solution for this is to :
    1. Go to Stripe dashboard and create a new custom plan with the prices you want.

    2. Find that customer in Stripe dashboard. You can search by customer_id. You can find the customer_id in the blog Manage page in Subscription Information box.

    3. Since you have member's OK, you can assign a new plan with a new subscription to that customer id. To add that new subscription to the customer, scroll to the "Active Subscriptions" section:

    4. Click on "Add Subscription" in the above screenshot. In the subscription make sure you choose the correct plan. You might need to remove the existing subscription(s).

    5. After you have completed this, you need to set the correct subscription_id for that blog/site. In the same mu-plugin, I have added the option to update customer_id and subscription_id if Stripe is the gateway. So, copy the new subscription_id and paste it in the Subscription id field that the mu-plugin provides.

    I would strongly recommend to first create a new test blog/site with Stripe sandbox and do some test before you do add a new plan to an actual customer.

    Hope this helps!

  • antKat

    Hi Panos, thank you for the help. I have not had the time to test this approach for site 739. However, I had a new sign-up today in Stripe. Pro Sites extended the site for 30 days but the subscription description is saying that the site is using another gateway. I was wondering if I should use your plugin when this issue arises. Stripe is showing the customer and subscription correctly. This is for site 917.

  • antKat

    Hi Panos,
    You can try testing Stripe sandbox between the hours of 3:00 AM and 5:00 AM EDT so as not to interfere with live processing. Also check Site 893 in which customer just complained that we had double charged her on 4/13. I went to Stripe and found that there are 2 active subscriptions for the same blog (893) created on the same day. I will need to refund one - probably both payments made on the second subscription. How can there be 2 subscriptions active at the same time for the same blog? Would it matter which one I cancelled in Stripe so as to not cancel the both? Please advise how I should handle this.

  • Panos

    Hi antKat ,

    I am a bit confused. Could you please clarify the following?

    1. You mentioned that you are switching from PayPal over to Stripe. I didn't ask, but now I am wondering how do you achieve that as it might be related. These gateways create recurring subscriptions and charge automatically. This way users do not have to go to checkout page each time. So by simply removing PayPal from checkout and leaving only Stripe it's not enough to do the switch you are talking about. Could you please provide more info about this?

    2. This is related to above. Is it possible that you have been adding Plans manually for Stripe Dashboard? If this is the case, was 917 set like this?

    3. For site 893 I can't think of a reason how this could have happened. From site logs, site was registered on January. So this is the second payment. This payment is made by Stripe automatically, Pro Sites only receives payment information sent from Stripe and accordingly extends or expires site. Could you please check if there are 2 different payments you received for initial payment? I am trying to figure if it is possible to trigger the payment button twice. I tried that but it's not possible as button disappears instantly. Still I can't think of any other way Stripe would charge twice.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.