Stripe and Pro-sites plan name not being sent correctly?

Setting up stripe and getting the following error. The actual plan name is below, not sure if the site name is being stripped out? Pro-sites created the plans correctly in stripe but they do not seem to be called or sent correctly at checkout.

Stripe plan _1_1 does not exist.

sitedivision_com_1_1

Screenshot shows plan in stripe.

  • Patrick
    • Support Monkey

    Hey there @Site Division

    I hope you're well today!

    I just tested creating a new user & site on my own sandbox install via Stripe (in sandbox mode) and all went smoothly.

    Can you please check in your Stripe account under Logs, and click the arrow to the right of the transaction in question? We'll see a bunch of lovely data in the Response Body section that will tell us if the plan was found and assigned to the user (screenshot).

  • Patrick
    • Support Monkey

    @Site Division

    Hmm. Okay, then let's eliminate some silly stuff to be sure that it's not a simple option or setting that's been overlooked.

    Stripe can easily get confused if it encounters different currencies in its travels from one app to the other. Please be sure that the same currency is set in Pro Sites > Settings > Currency Settings and Pro Sites > Payment Gateways > Stripe > Stripe Currency and, in your Stripe Account Settings under the General tab.

    Please also ensure that you have selected the right mode in Pro Sites > Payment Gateways > Stripe > Stripe Currency and that the corresponding API keys are correctly entered there with no blank spaces.

  • Site Division
    • Site Builder, Child of Zeus

    @Patrick and anybody else that may care! LOL

    I think the problem is related to my other issue here:
    https://premium.wpmudev.org/forums/topic/main-site-themes-admin-page-only-showing-the-network-activated-themes#post-943447

    And also the message in the footer at my all sites menu in the network admin.

    I believe this is all related to a bug in prosites, when prosites is diabled I get Blog 1 permissions back as they should be.

  • Site Division
    • Site Builder, Child of Zeus

    @Patrick

    I have also noticed that the pro-sites checkout page is also stripping the main site domain name out of the My Sites -> Network Menu in the admin bar as I believe its removing it from the plan names being sent to stripe as well.

    When going to the pro-sites page, the admin-bar menu has all the links correctly until choosing a site to upgrade, then the Network menu gets stripped of the main site domain name. Goes from https://yoursite.com/wp-admin/network/ to https://wp-admin/network/

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Site Division

    hope you are doing good today :slight_smile:

    I can see you have custom URLs in admin bar replacing the default links that WordPress creates. It seems its a problem with customizations that you made to change the link.

    Have you reverted it back to original and also tested by deactivating other plugins on your website. To see any possible conflict. Apologies if I missed any thing above.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Site Division
    • Site Builder, Child of Zeus

    @Sajid
    Yes I have disabled all plugins, it had no effect. My problem is coming from this message that I get in the footer of the all sites page in the network admin.

    * => The original Level doesn't exist, it might have been removed.

    I notice in the pro-sites checkout code, its all based on the "original level".

    `if ( level.price_3_adjust ) {
    var original = $( 'ul.psts-level-' + level_id + ' .price.price_3 .original-amount' );
    if ( original.length == 0 ) {
    original = $( 'tr.level-' + level_id + ' .price.price_3 .original-amount' );
    }`
    My original level has been removed somehow. How can we restore it?

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Site Division

    Hope you are doing good today :slight_smile:

    I can see, in other thread that you found the culprit. Is it working for you now ?

    Also please provide steps so we can reproduce this issue on our own install and mark it as bug.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Site Division
    • Site Builder, Child of Zeus

    @Sajid

    Ok.

    The issue: Stripe payment gateway would fail at checkout returning a message that "_1_2" plan did not exist. The user info would be collected with Stripe but the page would just loop and basically refresh. So no transaction and no account plan created at my Pro-site. At Stripe the plans were being created and named after the site, not the plan itself, strange! I would think the plan would be named after the plans, like "basic_1_2" plan but in reality its the "sitename_1_2" plan. It was then apparent that something was stripping out the domain when communicating with Stripe.

    So yes I eventually found that multi-domains was causing a conflict with Stripe Payment Gateway in Pro-sites. After going through all the usual plugins that cause problems, I only had Domain-mapping and Multi-domains left to deactivate and test. I might add that I use Multi-DB and learned a lot trouble shooting this problem and swimming in personal anguish! .....LOL

    After finding that Multi-domains was the conflict, it only took me a short time to find the line of code that needed to be commented out to rectify the issue. You can find this code in multi-domains.php file.

    //
     Empty $current_site global on signup page
    		//add_action( 'signup_hidden_fields', array( $this, 'modify_current_site' ) );

    I might add that I do not use checkout at signup and use a custom signup.php file for site registration, although this problem was occurring on the automatically generated Pro-sites checkout page. So I'm not sure if commenting out that line of code would affect other users and the setups they have. I also don't know what that line of code was intended to prevent, as after extensive testing of new user signups and new site creation under existing accounts, all had no issues being created or checking out.

    So any feedback on why that line of code is there would be educational and appreciated. :slight_smile:

    Cheers!

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Site Division

    Hope you are doing good today and welcome back :slight_smile:

    I would like to thank you for all the effort in finding out the culprit and reporting it back on forum with possible fix.

    I am flagging developer (@Umesh Kumar) on this thread for their feedback on this matter to get insight on this issue. What that line suppose to and also a way to fix this so it would not happen again in future. He will respond here as soon as possible depending on his workload.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.