Inhalte aufrufen

Profilbild

Problems trying to "clone" a payment method plugin


  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
3 Antworten zu diesem Thema

#1 d0ndela

d0ndela

    Newbie

  • Members
  • 8 Beiträge

Geschrieben: 26 July 2014 - 05:31

I'm trying to create my own payment plugins because our ordering process is different than the supplied payment plugins will support.

 

I'm trying to clone the PayInStore plugin, copied the project files to a new plugins folder and renamed it to my payment method name, then I (manually) basically did a search and replace, everywhere it said PayInStore I replaced it with MyNewPaymentMethod.

I changed the output path and when I rebuild the project I get the output in a new plugin folder in src/Presentation/SmartStore.Web/Plugins/MyNewPaymentMethod

 

I went to the plugins page in the admin panel and installed the plugin, no errors.

 

Now when I go to the PaymentMethods page (Admin/Payment/Methods) I see the new payment method there and so I want to configure it, I click the Configure link and I get the exception: {"The controller for path '/Admin/Payment/ConfigureMethod' was not found or does not implement IController."}

 

I tried to activate the plugin so I could test it in the frontend when placing a new order.

I can pick it from the checkout/paymentmethod page, but when I click next I get a similar exception: {"The controller for path '/checkout/paymentinfo' was not found or does not implement IController."}

 

I spent a long time trying to compare the original plugin and the one I made, and I did not make ANY other changes other than changing the name of methods/variables to the new plugin name.

 

Any good ideas what could be wrong here?



#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3383 Beiträge

Geschrieben: 26 July 2014 - 10:04

First thing: open the plugin project file and change the ProjectGuid.
 
Suggestions for your problem:
- Check namespace and path of controllers and views: For MyNewPaymentMethodController the views folder should have a subfolder MyNewPaymentMethod 
with a view Configure.cshtml.
- Check payment processor file: GetConfigurationRoute and GetPaymentInfoRoute should serve correct names and route values.
- Check route provider file: It should serve correct names and route values. Older plugins typically have one route for each action handler.
It is better to use one route for each plugin controller. For exmaple
routes.MapRoute("Plugin.Payments.MyNewPaymentMethod",
  "Plugins/PaymentsMyNewPaymentMethod/{action}",
  new { controller = "MyNewPaymentMethod" },
  new[] { "SmartStore.Plugin.Payments.MyNewPaymentMethod.Controllers" }
)...

Schöne Grüße aus Düsseldorf,
Marcus Gesing


#3 d0ndela

d0ndela

    Newbie

  • Members
  • 8 Beiträge

Geschrieben: 26 July 2014 - 10:44

Thank you for the reply, I changed the GUID to a new one and went through everything again, not sure what I did this time around, but now it seems to be working :)

 

Thank you for great support, getting more and more things on my list ticked off before we can change over to this shop. Really liking this product.



#4 Jacky Jacson

Jacky Jacson

    Newbie

  • Members
  • 1 Beiträge

Geschrieben: 27 October 2014 - 13:14

I can pick it from the checkout/paymentmethod page, but when I click next I get a similar exception: {"The controller for path '/checkout/paymentinfo' was not found or does not implement IController."}


Are you worried about 642-742 free brain dumps exam prep and a+ certification practice test? Check out our latest resources for CHECKPOINT dumps and Arcadia University questions .