Pro Site - test payment not processing

I'm new to WPMUDEV. I created a test multisite system and installed Pro Sites. I setup a Stripe account and created a gateway with my test Publishable key and test Secret key. I created some levels with different prices. When I buy a plan, the Stripe API kicks in and I can use the test card number (as directed by Stripe) of 5555555555554444. When I click "Subscribe" it says processing for a few seconds and then it clears out the form and stays on that page. I was expecting it to create the site and go to a thank you page. Can you please help me troubleshoot this?

  • Fabio Fava
    • WordPress DevOps

    Hey Coffeegeek !

    I had this same issue. I've contacted Stripe Support, and they've told me that their Sandbox doesn't support Recurring Payments (as is the case of Pro Sites). I've done a "real live test" with a personal credit card, and it seems to work just fine. I'm still waiting my first payment to get on my account, so I can't say it's fully working, but the Stripe Dashboard has registered the whole transaction, and hopefully in a week or two I'll receive it.

    Hope it helps, cheers!

  • Dimitris
    • Support Star

    Hello there @Coffeegeek,

    hope you're doing good today and thanks for joining us! :slight_smile:

    I just tested again Pro Sites with sandbox mode of Stripe and this is still working good in my end.
    Initial testing payment went through successfully and site was created without any issues.
    Please keep in mind that in order for Stripe, which is handling the whole payment process on its own, to communicate back with your website and let it know about the payment status, you should insert a webhook URL in Stripe's end here: https://dashboard.stripe.com/account/webhooks
    You can find the exact URL in Pro Sites -> Payment gateways -> Stripe

    Warm regards,
    Dimitris

  • Brandon
    • Recruit

    Hi Dimitris!

    Thanks for the details and for checking it on your side. I just spent some time on a WPMUDEV support chat. The support person (I believe Luis) took the time to setup and test a Stripe sandbox payment on his side. He got the same behavior that I experienced--said processing for a few seconds and then the name and card number cleared and page stayed the same. He thought there was a problem with Stripe and was going to forward the case to the WPMUDEV dev team.

    I did add the webhooks link in my Stripe account. I'll keep playing with it...something strange is going on here. I also logged a support ticket with Stripe asking about recurring payments in their sandbox. I'll update here when I hear back.

  • Brandon
    • Recruit

    I think something else might be going on here. I created a fresh multisite WP install, added SSL, put it on an extra domain name I had, installed Pro Sites, created a product for $1 and setup Stripe including the webhook. I also clicked the "Edit Checkout Page" link in Pro Sites/Settings to make sure the checkout page got created.

    Here is what happens with test keys/test mode:
    1) added user/email/site info, clicked "reserve your site"-->new user got added
    2) entered test payment info and clicked "subscribe"
    3) icon came up "processing" for few seconds and then the page reloaded
    4) payment form was still at the bottom, but the fields were now empty
    5) site was not created
    6) The Stripe log showed: status 400 Err

    Here is what happens with live keys in live mode:
    1) added user/email/site info, clicked "reserve your site"-->new user got added
    2) entered my credit card and clicked "subscribe"
    3) icon came up "processing" for few seconds and then the page reloaded
    4) payment form was still at the bottom, but the fields were now empty
    5) site was not created
    6) The Stripe log showed: status 200 OK
    7) Stripe shows no processed payments

    Maybe I missed a step in getting this setup?

  • Brandon
    • Recruit

    Hi Fabio,

    Yes, and it shows error status on the Stripe log for the Sandbox test. I just included the sandbox behavior for completeness.

    The live test still didn’t behave as I expected. Even though the Stripe log shows “200 OK”, Pro Sites didn’t go to the confirmation page and didn’t create the site. That is why I’m wondering if something else is wrong too as your live test worked.

  • Brandon
    • Recruit

    Hi Fabio,

    I had a chance to test more. Here are the items I disabled:

    All plugins (except pro sites)
    Changed Divi theme to WPMUDEV upfront theme
    Unchecked all modules in pro sites setup

    Even after doing this I couldn’t get it to work—same behavior. After entering the payment info, the signup page just reloads and no site is created. I would welcome any other things I could try.

  • Brandon
    • Recruit

    Update:

    I configured PayPal sandbox and Pro Sites works correctly. After completing checkout process I get the confirmation page and the site is created.

    Stripe did answer my support ticket with this message:

    To quickly answer your question, it is possible to test recurring payments via your Stripe Dashboard while in Test mode. However, it won't work if you attempt to process these recurring test payments with real/live credit cards, because the payment will fail and you won't be able to proceed with the recurring payment process.

    But unfortunately that wasn't my question (I asked about using API, not dashboard.)

    So, not sure why Stipe isn't working, but I guess I'll just use PayPal instead.

  • Brandon
    • Recruit

    Hi Fabio,

    I didn't know that. What a hassle! I really don't want to force the customer to sign up for PayPal.

    The API log on stripe.com does confirm the sandbox test produces a status code of 200 OK. For some reason though the payment page just reloads instead of going to the confirmation page and creating the site. The PayPal sandbox test did go to a confirmation page and did create the site.

    Thanks for the feedback!

  • Fabio Fava
    • WordPress DevOps

    Hey Coffeegeek

    That's I I've moved my buzz into Stripe. It's 100% transparent for the customer, who just have to put their Credit Card information on your site, and it's all done. I would recommend you to just give a try for a cheap, simple Real (Live) test with the Stripe platform. Then you debug, since it can be done with your own credit card.

    Hope it helps in some way, cheers!

  • Dimitris
    • Support Star

    Hello there Coffeegeek,

    hope you're doing good today and please excuse my late response here!

    Could you please create a new testing environment for us and provide some more access details?
    I'd like you to:
    - install a fresh WP site (no need to add SSL)
    - install WPMUDEV Dashboard and ProSites (no other plugin or theme)
    - set your Stripe sandbox API keys

    As this is public forum, you should send us your details through our safe contact form https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

    Subject: "Attn: Dimitris"
    - WordPress admin (login url/username/password)
    - FTP credentials (host/username/password)
    - cPanel/Plesk credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Keep in mind the subject line as ensures that it gets assigned to me.

    Warm regards,
    Dimitris

  • Dimitris
    • Support Star

    Hello there Coffeegeek,

    hope you're doing good today! :slight_smile:

    Appreciate the staging site, I was able to see that in action. I even tried to enter my testing Stripe keys, didn't make any difference though.
    I've double checked again in another testing site of mine, and I can still see that this is working well in my end, so I guess that this is some kind of server-related issue.
    I've already escalated this to our Second Level Support team for further investigation.
    Me or another colleague of mine will keep you posted here as soon as we've got some valuable insights. Your patience on this is highly appreciated!

    Warm regards,
    Dimitris

  • Brandon
    • Recruit

    Hi Dimitris,

    I found this in the error log:

    AH01071: Got error 'PHP message: Error in /mnt/data/home/123712.cloudwaysapps.com/kxhpvxauja/public_html/wp-content/plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.php at line 421

    AH01071: Got error 'PHP message: Error in /mnt/data/home/123712.cloudwaysapps.com/kxhsjtauja/public_html/wp-content/plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.php at line 421Plan already exists.\

    Hope that helps isolate the issue.

    Best regards and thanks again

  • Ari
    • Recruit

    Hey Coffeegeek

    Hope you are well today!

    Since Stripe released new API version just few days ago, we had to change few lines of code to make our plugin compatible with Latest API. I changed these lines of codes and forwarded it to our plugin developer, so they have a review for next release. In the meantime I'm giving you the latest files so you can play with it, please follow the instructions below:

    1: Download the attached zip file, upzip it, you will find a file name: "gateway-stripe.php"
    2: By FTP or cPanel change this file plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.php with new gateway-stripe.php file.

    3: Now login to our site, if any object caching plugin active, clear the cache. or disable it for some time.
    4: Go to: http://yourdomain.com/wp-admin/network/admin.php?page=psts-levels
    5: Do nothing, just click on "Save Levels" button. ( It will create proper plans in the stripe )

    6: Also Follow Dimitris suggestion about webhooks: https://premium.wpmudev.org/forums/topic/pro-site-test-payment-not-processing#post-1304974
    7: Also upgrade the API to latest version.

    Now try playing with it, if you face same problem, please wait 2 - 3 hours and try again. This works for me, let me know if that works fine from your end too.

    Regards
    Ari

  • Brandon
    • Recruit

    I was doing further testing and I'm getting this error in the log after submitting the credit card:

    AH01071: Got error 'PHP message: Stripe Notice: Undefined property of Stripe_AttachedObject instance: blog_id\n'

    The message on the screen is "There was an error processing your Credit Card with Stripe. Please try again." If I try again the payment (sandbox) works and I go the the confirmation page.

    It could be the gateway-stripe.php file changed by Ari above fixed one error, but I hit another? It sounds like the next release of Pro Sites will take this Stripe change into account. I hope it is released soon!

  • Brandon
    • Recruit

    Hi Ari!

    I'm still in the sandbox. After submitting the credit card it failed and said try again. On second try with same information it worked (I did this cycle several times).

    I just performed the test again to make screenshots for you. It works perfectly now! I'm wondering if there was another issue going on...

    When I had to enter it a second time though, I did get this error in the log:

    AH01071: Got error 'PHP message: Stripe Notice: Undefined property of Stripe_AttachedObject instance: blog_id\n'

    I'll continue testing and will try a live payment and let you know if I face any other issues. Thanks for the response!

  • Fabio Fava
    • WordPress DevOps

    Hey Coffeegeek

    If you check my 1st response, I've been with Stripe Support and all that. For now I can confirm that Live Recurring Payments appears to be working just fine, and the money is going to my Bank Account (the one I've confirmed at Stripe Dashboard).

    I'm running a test account with real Credit Card, and I post here as I have any news. For now, it seems to be working for the Recurring Stripe Payments.

    P.S. --> A handy tip I got from Stripe Support is to NOT use "-" on any bank number or bank account number, as this can cause Automatic Witdraws to fail. Indeed my 1st payment got stuck trying and failing (my fault I didn't check the Logs as I should have been). Now that the Stripe Support has corrected my Bank Account Number (removing the "-"s) it's going on.

    Hope it helps, cheers.

  • Panos
    • SLS

    Hi there Coffeegeek ,

    Apologies for such a late reply.

    I would like to have a closer look on this issue, the admin credentials work but I can't connect via ftp.

    Could you please send in new ones? Similar as Dimitris asked:

    From our contact page : 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

    Kind regards!

  • Brandon
    • Recruit

    Check your error log and see if you're getting:

    AH01071: Got error 'PHP message: Error in /mnt/data/home/123712.cloudwaysapps.com/kxhsjtauja/public_html/wp-content/plugins/pro-sites/pro-sites-files/gateways/gateway-stripe.php at line 421Plan already exists.\

    If so, I guess the problem is in the gateway-stripe.php file. Stripe changed something with their API and this file needs to be updated in the next release of the plugin.

  • Simplebutcreative Media
    • Site Builder, Child of Zeus

    Dimitris

    I do have another thread. Check it out below...

    https://premium.wpmudev.org/forums/topic/pro-sites-checkout-not-working-correctly

    I tried Ari gateway stripe php patch and it seems to be working fine with at least the last 2 test signups I did. Before, after submitting your cc info it would just refresh back to the payment form. That's for both live and test mode. If you check out that thread (screenshot) I'm also getting some kind of error. This is regarding the 2 test signups, when the user logs in their subsite for the 1st time.

    I also have another issue...Thread below...

    https://premium.wpmudev.org/forums/topic/mix-content-error-on-subdomain-login-page

    This issue showed up with the 2 new test site signups. Once I've signed up, I go back to try to log in thru wp-admin. It just keeps on refreshing back to the wp-admin page. I would have to log in thru the main site wp-admin with the test site credentials.

    I did a reset as instructed by Ivan by mu plugins. It seemed to start working but the problem came back shortly after.

    • Dimitris
      • Support Star

      As long as there're separate threads about these, please lets carry on in these instead.
      For any additional info you have, please reply back in the corresponding thread. This will make things much easier for us and members in other threads won't be getting email notifications about progress(or not) that's not related with their own issues. :slight_smile:

      Take care,
      Dimitris

  • Panos
    • SLS

    Hey Coffeegeek ,

    Sorry, I missed that you had sent me in credentials. I tested them and again I couldn't connect. Asked some colleagues to try connect using them but similar they couldn't. I think that the issue is on the customer_key, and this issue may be caused if some plugin gives users capabilities on main site. I have a temp patch for that but I need to check which is the exact capability. Could you please create new ftp creds and check if they work on your side too? Then you could send them in as you did previously. Or you can send in cpanel access to be sure.

    Fabio Fava , I notice that you have mentioned several times that recurring payments are not working on Stripe test mode. I have no issue in test mode, recurring payments work fine. If you are having any issues you can open a new thread about it if have not already :slight_smile:

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.