Read More
Menu Close

    Multi-Company SaaS Module for Magento 2

    SaaS Module stands for Software as a service the main purpose is to deliver on-demand computing services through the app over the internet.

    Furthermore, It improves accessibility, scalability, and reliability while minimizing overhead and maintenance costs. Magento 2 SaaS module provides the facility to the vendors to become the tenants with their separate subdomain.

    The benefit of this module is vendors don’t need to pay a commission after purchasing the subscription.

    Note:

    • This is an add-on of Webkul’s Magento 2 Multi-Vendor Marketplace, so you need to install Marketplace modules first. Also for the proper functioning of this module, you need to install Magento 2 Vendor Subdomain module separately.
    • When a membership plan added in the cart, other products can not buy.
    • To use this module Paypal and stripe credentials are required.

    Features of SaaS Module

    • It supports online Recurring Payments with PayPal & Stripe.
    • The vendor can become the tenant of the store.
    • The admin can create multiple membership plan as per their requirement.
    • Vendor dont need to pay any commission to the admin after purchasing the membership.
    • The vendor can create their separate subdomain for their panel.
    • Vendors can purchase only one SaaS Subscription Plan at a time.
    • Payment will auto deduct after membership plan is over.

    Install Extension from Webkul Store

    #1 Download Module

    Firstly, you need to log in to Webkul Store, go to My Account>My Purchased Products section, verify and then download and extract the contents of this zip folder on the system.

    Start your headless eCommerce
    now.
    Read More

    #2 Upload Folder

    Once the module zip is extracted, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:

    installation

    #3 Run Commands

    After uploading the module folder, you need to run the following commands in the Magento 2 root directory:

    • composer require stripe/stripe-php:~7.40
    • composer require paypal/rest-api-sdk-php:*
    • php bin/magento setup:upgrade
    • php bin/magento setup:di:compile
    • php bin/magento setup:static-content:deploy
    • php bin/magento indexer:reindex
    • php bin/magento cache:flush

    Install Extension from Magento Marketplace

    If you have purchased this extension from the Magento Marketplace then please follow the below process or visit this link.

    #1 Get Access Keys

    You need to get access keys, navigate to My Profile in Magento Marketplace, then choose Access Keys in the My Products section.

    my-profile

    Go to Magento 2 and then you need to copy both the Access Keys – Public Key and Private Key. These access keys will be needed in the next steps for authentication.

    copy-keys

    If access keys are not created earlier, click Create A New Access Key, enter any name and click OK.

    create-key-name

    #2 Update composer.json File

    To know the component name and version number, go to your Magento Marketplace account section, My Profile>My Purchases, then find this extension to view the details.

    Please note – Below is an example image, every extension will have its unique component name and version.

    know-component-name-version

    After that, navigate to your Magento project directory and update your composer.json file in the following format.

    composer require <component-name>:<version>

    For example, to install version 4.0.0 of this extension you need to run the following command:

    composer require webkul/multi-company-saas-module:4.0.0

    #3 Enter Access Keys

    Now you will need to enter the Access Keys that you obtained as explained in the first step #1 Get Access Keys. Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.

    #4 Run Command

    You need to run the following commands:

    • composer require stripe/stripe-php:~7.40
    • composer require paypal/rest-api-sdk-php:*
    • php bin/magento setup:upgrade
    • php bin/magento setup:di:compile
    • php bin/magento setup:static-content:deploy
    • php bin/magento indexer:reindex
    • php bin/magento cache:flush

    Language Translation

    For translating the module language, navigate through src/app/code/Webkul/MultiCompanySaasModule/i18n and edit the en_US.csv file.

    Thereafter, rename the CSV as “en_SA.csv” and translate all right side content after the comma in the Arabic language. After editing the CSV, save it.

    Then upload it to the path src/app/code/Webkul/MultiCompanySaasModule/i18n where the Magento 2 is installed on the server. The module gets translated into the Arabic Language. It supports both RTL and LTR languages.

    webkul-magento2-paytabs-sadad-payment-multilingual-2

    Multi-Lingual Support

    For multilingual support, the admin will navigate through Store->Configuration->General ->Locale Options.

    After that, select the locale as English (United States) (the language into which the admin wants to translate his store content).

    Multi-country Language Popup-local_settings

    Module Configuration

    Now, after successfully installing the Magento 2 Multi-company Saas module the admin needs to Go Store > setting > configuration > Multi-Company SaaS module as per the following image. Furthermore, the admin needs to configure the settings.

    Mpsaas_config_settings_1

    Add Recurring payment

    The Saas Module accepts two recurring payment methods only:

    1. Paypal Connect
    2. Stripe connect

    PayPal Connect

    To set up these accounts firstly admin needs to enable the configuration settings, for that they need to navigate into store > configuration > sales > payment methods > PayPal recurring express checkout payment method.

    Mpsaas_paypal_config_2-2

    The admin needs to complete the setup process.

    Enable this solution: Enable/disable the payment set up.

    Sandbox mode: Select the Sandbox Mode as Yes(Testing Mode) or No(Production Mode).

    Title: The title of the Paypal checkout needs to be set here.

    Merchant PayPal Id: Merchant Id generates while payment setup on PayPal’s website.

    PayPal API Username, Password, and Signature: PayPal API Username, Password, and Signature will generate while creating an account on PayPal.

    Payment from applicable countries: The admin can select all countries or choose specific as well.

    Sort Order: Add preference by sort order.

    PayPal Account creation

    The admin firstly needs a PayPal account to configure it with the SaaS module. For that admin will create an account on PayPal with the required details or they can use their existing account.

    Mpsaas_Paypal_login-3

    After entering the login credentials PayPal will redirect you to the next page where the admin needs to select the account settings.

    Mpsaas_paypal_account_settings

    Afterward, The admin will choose an account from the added accounts and click on manage accounts icon.

    Paypal_account-3

    Here, the admin will click on the view and edit button, it will redirect to your account details page.

    Mpsaas_Paypal_account_id-1

    Here, you can find the email id, username, password, and account Id. Which we require at the time of payment method configuration.

    Mpsaas_paypal_signature-2

    How to set the IPN key?

    As the module supports the recurring profile feature, you need to configure the “Instant Payment Notification” settings. Thus, for this first, log in to your Paypal account.

    signup-1

    In the account settings, the admin will navigate into the business profile>notifications a page will open to get the ids for the PayPal account.

    Mpsaas_paypal_notification-1

    To get complete access to the PayPal portal you need to enter the IPN key for that you need to access the IPN section.

    Mpsaas_Paypal_IPN-1

    Here, the user will enter his module details like this – yourwebsite/mpsaas/paypal/webhook and hit the save button.

    Mpsaas_paypal_IPN_key-1

    Stripe Connect

    To set up these accounts firstly admin needs to enable the configuration settings, for that they need to navigate into store > configuration > sales > payment methods > Recurring Stripe Payment Method.

    Mpsaas_stripe_config_3

    The admin needs to complete the setup process.

    Enable this solution: Enable/disable the payment set up.

    Title: The title of the Paypal checkout needs to be set here.

    Sandbox mode: Select the Sandbox Mode as Yes(Testing Mode) or No(Production Mode).

    API Publishable Key: For API publishable key you need to access stripe connect.

    API Secret Key: Every stripe account has its own separate secret key.

    Set Name Display on Form: Which name will show on the front panel needs to be set here.

    Payment from applicable countries: Needs to set the countries.

    Minimum Order Total: The admin needs to set the minimum order total amount which is allowed by the stripe connect.

    Maximum Order Total: The admin will set the maximum order total amount to use stripe connect.

    Sort Order: Add preference by sort order.

    Generate Webhook: Webhook used for web alteration.

    How to get keys and Account ID for stripe configuration

    1st Step:

    To get the API Keys you can use the Stripe website. First, you’ll need to sign in to the stripe account or create an account.

    Go to https://dashboard.stripe.com/login and enter your login details.

    create-account

    2nd Step:

    Now from the stripe dashboard, you can click on the toggle button of the viewing test data and if you’re using the module for the test purpose or you can also use the live credentials of your stripe account API’s if you want to set up the module for the live website.

    Now, enable the Sandbox Mode as Yes(Testing Mode) or No(Production Mode).

    overview

    3rd Step:

    Click the API menu option on the side panel to see the Publishable key (API Publishable Key). Now, click the “Reveal test key token” to get your Secret Key (API Key).

    click API

    Clicking the “Reveal test key token” will bring up the – Secret Key (API Key).

    The admin can use API Publishable Key, and API Secret keys in the admin configuration to set up the module as per the below image:

    product Production of API key

    Henceforth, the API Key, API Publishable key, Account ID, and the Client Key are used to configure the module.

    Generate Webhooks In Stripe Payment Gateway

    In web development, a webhook is a method of altering the behavior of a web page, or web application, with custom callbacks. Therefore, Webhooks are user-defined HTTP callbacks that are triggered by specific events.

    After that, in the admin dashboard, the admin can click on the Generate Webhook and generate the data.

    Mpsaas_stripe_config_3-1

    after successful generating the webhook, the admin can see the successful message from the admin dashboard as shown in the image below –

    Stripe Payment Gateway for Magento 2-webhook admin panel

    Whenever that trigger event occurs on the website, the webhook sees the event and collects the data.

    Now, the admin can see the collected data from the stripe dashboard as shown in the image below –

    Webhooks-–-Test-data-1

    The admin can also click on the generated URL for the detailed view of the events as shown in the image below –

    Webhook-URL-detail
    Webhooks-URL-attempts

    Thus, the Webhooks generates in this way.

    Once both methods are configured it will display on the customer end while checkout.

    SaaS configuration

    The admin needs to set the membership duration type and subscription for that they need to navigate into the Marketplace management > SaaS configuration.

    Mpsaas_marketplace_management

    Manage Duration Type

    Here, the admin can manage the duration of the membership for their sellers to become tenants.

    Mpsaas_add_duration_5

    A list of added membership plans will display here admin can delete, edit, and add the membership type.

    Mpsaas_bulk_action_add_duration_6

    Add Duration Type

    The admin can create any custom membership plans for the sellers and that will display on the frontend in the membership plans list.

    Mpsaas_add_duration_6-1

    Afterward, the admin will fill in the basic details for the plan like duration title, days, subscription charge, status, and sort order and click on save to add the membership plan.

    Manage subscription

    All purchased membership plans will display here with seller details.

    Mpsaas_added_durations_7

    Frontend SaaS configuration

    On the seller end, sellers need to navigate into their account section where an option is available called Pay Membership amount to become the tenants of the store.

    Mpsaas_membership_selection

    From the available memberships plan, the seller can choose anyone at a time and proceed further to the next step.

    Mpsaas_mebership-plan

    After the plan selection, it will redirect you to the shopping cart with a success message.

    Mpsaas_shoppingcart

    Afterward, the seller will click on the view and edit cart option and it redirects to the shopping cart page to proceed further.

    Mpsaas_checkout-1

    When the seller clicks on the proceed to checkout option it will ask for the payment selection option.

    image-2-1

    Thereafter, the seller will click on the place order button and it will redirect them to the PayPal login page (If the seller selects the stripe method then it will redirect them to the stripe login page).

    image-3-1

    If the seller already has an account they can directly login to their account and make the payment after successful payment order status will change at the front panel and display the success message.

    image-4-1

    After the successful purchase seller can check the success message in the pay membership amount tab.

    image-5-2

    The seller and admin both can check the order summary in their order history tab after the successful payment.

    Before subscription, a seller needs to pay some commission to the admin as per the following image.

    Mpsaas_with_commission

    After taking the membership plan seller doesn’t need to pay any commission to the admin.

    Mpsaas_without_commission

    Vendor Subdomain Setting

    With the help of the vendor subdomain, module sellers can create a separate subdomain for their stores.

    The seller adds the subdomain URL while entering the details of his account from the seller profile section.

    add_subdomain

    If the seller wants to view his profile so he needs to click on the view profile option and it will redirect them to their domain page.

    Mpsaas_subdomain_view_profile-1

    Thereafter, if the seller wants to check the collection then he needs to click on the view collection tab.

    Mpsaas_subdomain_view-1

    That’s all for the Magento 2 Marketplace Extension. So if you still have any doubts or suggestions, feel free to add a ticket.

    Moreover, let us know your views to make the extension better https://webkul.uvdesk.com/.

    Current Product Version - 5.0.0

    Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Table of Content