Giter Site home page Giter Site logo

partnercentersamples / reseller-web-application Goto Github PK

View Code? Open in Web Editor NEW
58.0 26.0 54.0 3.53 MB

A web application that enables reseller partners to onboard customers and place orders for these customers.

License: MIT License

C# 49.94% CSS 3.68% ASP 0.01% JavaScript 33.37% PowerShell 0.64% HTML 12.35%
storefront microsoft partnercenter sdk csp

reseller-web-application's Introduction

Partner Center Storefront

Build status

GitHub issues GitHub pull-requests

Overview

A web application that acts as a store front for Microsoft partners and enables them to sell Microsoft offers to their customers. The application gives partners the following features:

  1. Configure the Microsoft offers they would like to sell to their customers. Partners can set the price and append extra details.
  2. Configure the portal branding to reflect their company branding. This includes setting the company name, header icons, etc...
  3. Payment. Partners can configure their PayPal pro account which will receive payments from customers.

The store front application currently supports the following languages (French, Spanish, German and Japanese) along with English which serves as the fallback language. It uses the partner's default locale to configure the locale (currencies, date formats, localized offers in the repository) using the partner Profile from Partner Center.

Customers can

  1. Use the portal to view the offers available, purchase the quantities they need and make a payment from the storefront.
  2. Log back in and view their subscriptions, purchase extra seats or renew about to expire subscriptions.
  3. View all the subscriptions (whether they have purchased via the store front or have been managed for them from Partner Center) in the My Account page after they login.

Deployment

You can perform this deployment through Partner Center, to start this process click here. Also, there is a deployment project included in the solution through which, deployment can be started with the specified inputs.

Deploy to Azure Visualize

Build & Deploy on your own

If you are interested to fork and custom build/deploy the store front. We recommend reading this blog post by Isaiah Williams

Clone the source code and perform the following steps:

  1. Go to Partner Center, Account Settings, App Management and onboard a new Web App. Copy the application ID, application secret and the partner tenant ID into the following settings in Web.Config:

    <!-- Enter your Partner Center AAD application ID here -->
    <add key="partnerCenter.applicationId" value="" />
    
    <!-- Enter your Partner Center AAD application secret here -->
    <add key="partnerCenter.applicationSecret" value="" />
    
    <!-- Enter your Partner Center AAD tenant ID here -->
    <add key="partnerCenter.AadTenantId" value="" />
  2. Create a Web application in your Azure AD tenant. The portal will assume the identity of this application. Change the following settings in Web.Config to your AD application information:

    <!-- The AAD client ID of the application running the web portal -->
    <add key="webPortal.clientId" value="" />
    
    <!-- The AAD client secret of the application running the web portal -->
    <add key="webPortal.clientSecret" value="" />
    
    <!-- The AAD tenant ID of the application running the web portal -->
    <add key="webPortal.AadTenantId" value="" />
    
    <!-- The AAD client ID of the application running the web portal -->
    <add key="webPortal.clientId" value="" />
    
    <!-- The AAD client secret of the application running the web portal -->
    <add key="webPortal.clientSecret" value="" />
    
    <!-- The AAD tenant ID of the application running the web portal -->
    <add key="webPortal.AadTenantId" value="" />
  3. Provision an Azure storage account which will store the portal's assets and information. Copy its connection string to:

    <!-- The Azure storage connection string which will host the web portal's settings and customers repository. -->
    <add key="webPortal.azureStorageConnectionString" value="" />
  4. Optionally, specify a REDIS cache connection string to improve performance.

    <!-- The Azure Redis cache connection string. Empty value will disable caching. -->
    <add key="webPortal.cacheConnectionString" value="" />

reseller-web-application's People

Contributors

idwilliams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reseller-web-application's Issues

HeaderBar

Hi,

Im new in this and i have a problem when i try to modify the HeaderBar.
I want to remove some parts of the HeaderBar and when i try, i have differents fails.
If you can help me with this or give me a link with information for resolve this.
In special i want remove or change parts of the div with id=PrimaryNavigationTiles

Thanks in advance.

Issue with Payment Gateway

Hi Team,

I have a small request to you folks with regards to this code and wonder if you folks can help.

Currently, this code allows only Paypal as the Payment Gateway. I am based out of India and under the CSP Program we can have only Indian customers. Unfortunately, I cannot use Paypal in India for transactions within India. Having said that though this code provides and includes everything that I may need or could think of the challenge with Payment Gateway is holding me up. Do you think you can help me with that? Or perhaps advise the sections of the code that will have to be changed so I can have my own payment gateway?

Any help is highly appreciated.

Thanks!
Vijayaraghavan

Access token refresh

Expected behavior

When access tokens have expired the application should refresh them silently or force the user to reauthenticate

Actual behavior

Once the access token has received administrative users are encountering the following error when trying to access any of the admin features

You do not have the rights needed to access this area

Steps to reproduce the problem

  1. Login to the reseller storefront
  2. Leave the browser open for a hour
  3. Click on any of the admin features

Refreshing the browser corrects this issue. However, ideally the portal would refresh the token on behalf of the user.

Bermuda Usage

Hi,

When we tried to deploy for our LATAM reseller site, we get an issue straight away that saysCulture name 'BM' is not supported.
Parameter name: name

Here is the site MSFT generated for us.
https://fmreseller.azurewebsites.net/

Any advice? you can email me direct csimpson (at) fireminds.com

Existing CSP customer can not log on to Reseller Web Application

Title

Existing CSP customer can not log on to Reseller Web Application

Functional impact

Existing customers are not able to access the portal

Minimal repro steps

Install newest version of Reseller Web Application on a CSP Direct tenant with customers
Configure the 3 steps on the Reseller Web Application
Try to log on to the application with a Global Admin from one of the customer tenants:
1: Enter Username
2: Enter password
3: Optional: fulfill 2-factor validation

Expected result

Authentication succeds and the customer can maintain already purchased licenses

Actual result

An error with this message occours:
Error: AADSTS70001: Application with identifier "Reseller Web Application Application ID" was not found in the directory "Customer Directory ID"

Further technical details

It seems the Reseller Web Application is unknown in the customer tenant. Furthermore I suppose the customer should have some sort of role in the application ie. Global Admin in the customer tenant?

Error Validating Credentials

I was trying to make your sample work, did all the steps found at your post on MSDN Blog but when i do the Deploy using Visual Studio returns an error page.
screenshot_1

Could you help me to fix it?

Payment Gateway Callback URL

I'm trying to customize this for Nigeria using Paystack Gateway - https://paystack.com/ . Payment is completed on its site and Paystack requires a callback url to post the response status to. What would this be in this case? Are there any parameters to be included?

Reference - https://developers.paystack.co/docs

As an aside, is there any documentation / post on how to create or customize the gateways for unsupported countries?

custom domain with custom SSL login error

Hello,
after we configure our custom domain / URL and attach a certificate, we have following error when the user is using the custom domain:
"IDX10311: RequireNonce is 'true' (default) but validationContext.Nonce is null. A nonce cannot be validated. If you don't need to check the nonce, set OpenIdConnectProtocolValidator.RequireNonce to 'false'."

When the same user using the app URL, it's working.
I have configure all "answer" URLs in the AAD application.
http:// - https://business.hcloud.services
the app URL is http:// - https://hcloudshop.azurewebsites.net

Thanks for your support
Regards
Michael

Readme.md required.

Please add a readme.md so that folks know what they need to do as they clone/download the codebase. Is this covered else where? If so at the minimum the details & link to such documentation can be maintained in the readme.md.

Support Phone format in US Only

Hi, when deploying the store as is without any customisation from PartnerCenter, the phone number format accepts only US phone number, can't save any other number, eg. Australia

CloudStorageAccount BlobStorage Uri Mismatch

Trying to get the sample running locally with the Azure Storage Emulator and getting the following error on initial page load:

Primary and secondary location URIs in a StorageUri must point to the same resource. Parameter name: secondaryUri

This error is thrown at AzureStorageService.cs at line 91

Line 89:             if (CloudStorageAccount.TryParse(azureStorageConnectionString, out cloudStorageAccount))
Line 90:             {
Line 91:                 this.storageAccount = new CloudStorageAccount(cloudStorageAccount.Credentials, endpointSuffix: azureStorageConnectionEndpointSuffix, useHttps: true);
Line 92:             }
Line 93:             else

azureStorageConnectionString = UseDevelopmentStorage=true
azureStorageConnectionEndpointSuffix = http://127.0.0.1:10000

Please advise

DropdownList country empty

Hi Everyone,

When I try to buy an item, I can't select my country. There are no Options in dropdown list as you can see on the image below.
screenshot_4

International Usage

Hallo,
many thanks for your work.
But for an European / German CSP we need an other configuration:
Please fix or describe an "How-To" (for IT-pro and not DEV :-) )

  • At the customer registration page, please change the phone number format into an international or describe how (and where) we can change that into european (or german) format
  • PayPal order dosn't work with german PayPal Business Accounts, because CC isn't allow. We need like PayPal Express Checkout. I don't know, if the CC restriction is only in Germany or in Europe, too.
  • Customer Registration page, please add or read from the partnercenter all allowed countries. as an EFTA / EU CSP we can sell into more as one country.

Thanks for your support
Michael

How could get pricing for license-based services using API (REST or Managed) of Microsoft Store Partner Centner

The API of Microsoft Store Partner Center using RateCards returns usage-based services (Azure Services) and can't get license-based services pricing ? I could download the Excel file but my question is , is there any way to get pricing for license-based services using API (REST or Managed) of Microsoft Store Partner Center ?

When getting offers using the API, some information are missing like : ERP Price, List Price, Valid-To Date, Valid-From Date ?

Increasing License Counts?

Correct me if I'm wrong, but do customers not have the ability to change their license counts on the My Subscriptions page? Mine is showing the correct license based subscription counts (and Ids), but no ability to add to it.

Getting customer users list

Hello,

I'm trying to get customers user list with line of code ApplicationDomain.Instance.PartnerCenterClient.Customers.ById(clientCustomerId).Users.GetAsync().But getting error "The supplied role does not have the rights to perform the requested operation" or "This resource can't be accessed by application credentials." reponse code 500. With native given "csp console sample app", it's working. But with web app i can't get users.

Thanks

Customer unable to login

Hi,

I created web app from https://github.com/PartnerCenterSamples/Reseller-Web-Application. Now only partners can login to the app with admin rolw, but when i try login to the site with newly created customer user it promt's error - "access_denied" with response - "The application needs access to a service that your organization has not subscribed to. Please contact your Administrator to review the configuration
of your service subscriptions." What, i'm missing?

Thanks

Local Gateway

Is it possible to add a local payment gateway of my country in the application?

Urgent: After deploying, no Startsite is showing

Hi,
many thanks for your new build. The feature list Looks like very good.

But, when i deploy the solution over the partnercenter, there is no startsite showing. i can see Only the text inside the TAB (with Edge and IE on Windows 10)
The same is, when i deploy it Manual inside the current and running azurewebsite configuration.

Thanks again for oyur great Support.
Michael

Unexpected behaviors in portal

Hello guys,

I'm facing a problem when I try to buy one subscription without loggin.

I configured storefront to pre-approve transactions for all, but when I pick an offer and put all informations required to create a new customer, it redirects me to PayPal gateway.
So I try to run using localhost to follow unexpected redirection and fix it, but I click in "Proceed to Payment" button and throws me this following exception:
0x800a138f - JavaScript runtime error: Unable to get property 'type' of undefined or null reference
screenshot_4

So, portal is having different behaviors when is running on azure or localhost.

Redirecting after login

Hi,

I have the Customer Portal sample project setup and running in Visual Studio 2017.
Its deployed to Azure and running there, as is, out of the box.

My issue is debugging locally.
Only after I log in, it redirects to the azure hosted site instead of my https://localhost:44360 which should be the referrer.

I can't see any ref in the code to the deployed site url I can't really debug whilst its redirecting to the deployed site (from the MS login page).

I've not seen any articles or issues like this being raised by others, So I'm sure I'm missing something quite simple. But I can't see it.

Many thanks for your time,
Rod

Upgrade caused errors

Hi Team,

After upgrading the web store front via CSP, we are not getting several errors.

When loading the web page, we get "Could not retrieve the offers".

If I login using my account, and I try to go through offers setup, I am un able too and get the following error "Could not retrieve Microsoft offers".

Can you help?

Thanks

Subscription Add-Ons

Has anyone figure a way to handle "Add-on"s?

For example, if you add E1 plan, you also want to add Advance Threat Protection at the same time or the ability to change add-ons?

Customer Vs Partner Managed subscriptions

What is the difference between Customer Vs Partner Managed subscriptions?
Even when we revoke the Partner Delegated Admin permission, the subscriptions stays in the "Partner managed subscriptions" - Why is this?
Why can't a customer manage the subscription?
Is it possible to change the code to enable customer to still be able to manage these subscriptions ? Can we get some pointers for this ?
Thank you
Barry

Locale not supported when getting offers

Hi. I have successfully deployed the solution through the Partner Center and whilst going through the configuration wizard on the site (within "Offers Setup") I get an error stating unable to retrieve offers. When I run a stream log on Azure I find the following stack trace "Locale: en-GB
Base Description: Microsoft.Store.PartnerCenter.Exceptions.PartnerException: Locale en-GB is not supported
at Microsoft.Store.PartnerCenter.Network.PartnerServiceProxy`2.d__60.MoveNext()
"
Is this a known limitation?

Regards,
Jason

Incorrect reference for config attributes

The Web.config refers to both partnerCenter.domain and webPortal.domain as being of type AAD domain , which , as a casual user, I would assume is a string taking the format foo.onmicrosoft.com, but in fact this is an Identifier as opposed to a domain string.

The Source/PartnerCenter.CustomerPortal/App_Start/Startup.Auth.cs gives this away:

 if (userTenantId != ApplicationConfiguration.ActiveDirectoryDomain) 
 {

Will submit a pull to fix this.

Could not retrieve pre-approved customer details

Expected behavior

The pre-approved customers management user experience load without any error

Actual behavior

The pre-approved customers management user experience is loading with the following error "Could not retrieve pre-approved customer details"

Steps to reproduce the problem

Deploy the reseller storefront manually

PaymentSetup PayPal Could not save payment information

Hi There,

When we are trying to go through the three steps to setup the storefront, we are running into an issue trying to apply the paypal sandbox client id/client secret.

We are getting an error "Could not save payment information".

Is this a bug, if so how can we get this resolved? Can this be manually hard coded into a config file via ftp?

Thanks

Feature Request

Hi Team,

We have a few elements that we are wondering if they can be added/removed.

  1. Could be eliminate the function of Paypal, and payment all together, as we would like to simply provide the end user the ability to add and remove licenses and subscriptions, without collecting payment. We manage billing externally.

  2. Second, the country option only allows for USA, how and can we select Canada. We currently only sell to the Canadian market, does that mean we can not on board new customers in Canada through this portal/store front.

  3. Lastly, is it possible to have current customers login, and view their existing subscriptions that weren't activated within the store front?

Thanks.

Error aquiring new subscriptions with new Customer.

Hi everyone,
I'm facing an error when I try to buy a subscription without logging into portal.
I've follow this steps:

  1. Access Portal.
  2. Select the first Offer.
  3. Click "buy now" button.
  4. Put all information needed.
  5. Click "Proceed to Payment" button.
  6. Make the payment using PayPal.

When PayPal redirects me back to Portal I see the screen below.

screenshot_9

But When I check my Customer List in Partner Center Sandbox, the Customer was created with the same info that I put on form and no subscription assigned.

Getting subscription name after registration

Hi, I am having a problem on getting the subscription name or the product name after registering. After buying the certain product, i need to show on the registration confirmation page. Would someone please help me to get the subscription name
error

Cross origin issue

Hi, We are trying to deploy your re-seller portal in azure manually as we will be adding our own payment provider eventually.

I have followed the instructions apart from the website is hosted under a different subscription to the Active directory in azure. Not sure if this is the problem but thought i should mention it up front.

The website loads and i can see the loading image but it hangs. if i check in the developer console we are getting this error:
XMLHttpRequest cannot load https://login.microsoftonline.com/common/oauth2/authorize?client_id=f4e43cb9-258f-4d6d-ae43-ed9357bab384&response_mode=form_post&response_type=code+id_token&scope=openid+profile&state=OpenIdConnect.AuthenticationProperties%3dRbidEH3rZ_JhIw-5KXci3tIBv1h9_coYLfuHd6HiNFw5ETbtijku8XDztTD74Sm76KuhDyvNP4MoLATeHTBK0M_ztZM_CA27-Y4psxREa-Qpcg3L9kZUqBYJUJosdpfMGPDgrN8q78XPiqtbM8u64-VD3fXI8p4tpD2fssyGjRU&nonce=636420202582326337.ZmVkY2JkYWQtNmRhNy00ZDg5LTllNTUtMjY3NGVhMzBiOTU1ZTM1NTY5ZWYtMjc4MS00ZTc2LTgxNmMtNzM1NzAxNzg0NTM2&lc=2057&x-client-SKU=ID_NET&x-client-ver=1.0.40306.1554. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://dccspstorefront.azurewebsites.net' is therefore not allowed access.

Getting Server Error

When I trying to run application in debug in Visual Studio 2015. I get following error.

Server Error in '/' Application.

Unable to find account with tenant id 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' in AMS

I have setup integration sandbox in partner center, and updated config values for partnerCenter.applicationId, partnerCenter.applicationSecret, partnerCenter.AadTenantId , webPortal.clientId, webPortal.clientSecret, webPortal.AadTenantId from Partner center "App Management" using App ID, Key, Account ID.

I have set storage connection string for webPortal.azureStorageConnectionString as UseDevelopmentStorage=true.

Am I missing any other configuration to set?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.