Hi

i'm using NopCommerce 2.50 as backend for a mobile e-commerce application based on PhoneGap / jQueryMobile.
I wrote some webservices (consumed via ajax/json by the mobile app) for getting products list, creating orders, get orders list, etc.
The shopping cart is composed in the app and is sent to the webservices for creating a new order.

After order creation, i need to open the web page for the payment, so i create a PaymentGateway web page that must redirect to the right payment web site (paypal for example).

I want to use the PaymentService, but when i call the PostProcessPayment method, it fails because it can't find the PaymentMethod specified in the order.
After debubbing the nop code, i found that it can't find the PaymentMethod plugin (by the LoadPaymentMethodBySystemName).
It seems that no plugins are loaded.

Have to call some initialization method for getting plugins loaded?


This is the code i use:

      
      IPaymentService _nopPaymentService = EngineContext.Current.Resolve<IPaymentService>();
      IOrderService _nopOrderService = EngineContext.Current.Resolve<IOrderService>();

      var order = _nopOrderService.GetOrderById(orderId);

      if (!_nopPaymentService.CanRePostProcessPayment(order))
      {
        Response.Redirect("error.html");
      }

      var postProcessPaymentRequest = new PostProcessPaymentRequest()
      {
        Order = order
      };
      _nopPaymentService.PostProcessPayment(postProcessPaymentRequest);