Thursday, May 2, 2013

Orchard CMS, Magelia WebStore & Credit Card Processing

I recently became the project manager for a fully integrated CMS and eCommerce solution.  After reviewing  possible options, I selected Orchard CMS(www.orchardproject.net) with a Magelia WebStore (http://www.magelia.org/) integration.

I was able to get both solutions installed without to much trouble using Microsoft Web Platform Installer.  Magelia provides some decent documentation on their website on how to integrate both solutions but their credit card processing documentation is non-existent.

After emailing back and forth with the Magelia CEO and development team, I now have a good understand of how it works and have documented their undocumented API which i am posting here including an overview of the solution.

Overview:

  • Once you have installed both Magelia and Orchard and have integrated both products via the Magelia website tutorial (Found Here) you should be able to see products, add them to your cart and begin the checkout process.  
  • Once you get to the end of the process you will get the following error:  "Override this view (DisplayTemplates\Checkout\ProceedToPayment.cshtml) in your theme in order to submit payment data to the payment provider of your choice/". see example below:


ProceedToPayment.cshtml
  • Magelia provides an Orchard theme based off the default theme to make Paypal the payment gateway for the stores (Found Here).  If we want to use any other payment gateway we will need to override this theme.  It can be downloaded or install manually using the link above OR you can goto the theme gallery in Orchard and install it using the interface (recommend).  
  • At this point you can edit the theme directly in notepad.  I have Visual Studio and so i wanted to create a VS project.  Orchard has a great system for generating theme templates which visual studio project solutions. To do so you need to use the Orchard Command Line interface (More Info).  
  • Once the Orchard CLI is running execute the following command
    • codegen theme MyTheme /BasedOn:TheThemeMachineWithPaypalForMageliaWebStore /CreateProject:true /IncludeInSolution:true
  • This will create a new theme with a visual studio project file in it.
  • modify {IIS SERVER}\Orchard\Themes\MyTheme\Views\DisplayTemplates\Checkout\ProceedToPayment.cshtml and implement your credit card processing logic using Razor syntax.

Once complete you will need to log into orchard and apply the theme to your site.

Post questions below

8 comments:

  1. Excellent blog! I never expected to find such type of blog. The content you have posted in blog is really fabulous. You have described about the Credit card payment Processing . It is the good process for online transaction.

    ReplyDelete
  2. This blog is informative that can be use by any business establishments, even individual small business. It can help them a lot without any doubt because they can process transactions thru online.

    ReplyDelete
  3. Hello,
    Thanks for your article.
    I am not able to access the dropbox link for code reference. So can you please share me those files for code reference.

    Actually i am getting same error. I want to integrate paypal in Magelia Web store and want to know how can i provide other payment process?

    Thanks,
    Harsh

    ReplyDelete
  4. Need one more assistance that How can i redirect user from checkout to login if user is not logged in and provide registration as well.

    Thanks in advance.

    Regards,
    Harsh Patel

    ReplyDelete
  5. Great Post,we build your websites in the orchard CMS, we have an expertise in orchard CMS website development to help you drive your business.

    ReplyDelete
  6. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. how to start a payment processing company

    ReplyDelete
  7. The best thing about using such companies is that you are not usually required to supply any detailed information about your business plan, trading history as well as suppliers. credit card processing company for sale

    ReplyDelete
  8. Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet!  Start a Credit Card Processing Business

    ReplyDelete

Phoenix

I am resurrecting this tech blog for notes related to Azure Logic Apps with SAP.