I obtained from a payment operator from my country, a sample plugin that was developed for nop commerce 1.6
Is realistic to try to convert this in a payment plugin for SmartStore 2.1.x?
Thank you
Geschrieben: 23 March 2015 - 10:39
I obtained from a payment operator from my country, a sample plugin that was developed for nop commerce 1.6
Is realistic to try to convert this in a payment plugin for SmartStore 2.1.x?
Thank you
Geschrieben: 23 March 2015 - 10:52
Hi,
no, that will not work.
Which payment-method is it?
Regards
Wolfgang
Shopbetreiber benötigen Ihre Hilfe! Bewerten Sie jetzt Smartstore auf Capterra.
Als Dankeschön erhalten Sie 20 Euro für Ihren nächsten Kauf im Marketplace.
Bleibt gesund!
Viele zusätzliche Smartstore Plugins gibt es im MARKETPLACE:
http://community.sma...dex.php?/files/
Hier geht es zu den Smartstore Videos:
Smartstore.NET Youtube-Channel
Die deutsche Smartstore Online-Dokumentation gibt es hier:
https://smartstore.a...iew?mode=global
In dem folgenden BLOG findet man interessante Tipps & Tricks zum Thema "Smartstore":
http://community.sma...t-tipps-tricks/
Geschrieben: 23 March 2015 - 11:31
Hi,
I don't think to use it as is but to use it as starting point to re-write a new one. Is a national widely used payment operator (www.plationline.ro)
Initially I think to use the PayPal as starting point but I find that is to complicated to the purpose.
In fact I have two operators from which I obtained their API and examples, and mainly in plain aspx approach what I have to send to them via a http request (encoded) is the amount of money, and id of transaction, and an ID of buyer. All others info comes directly in their pages (number of card, date of expiration, name on card, CVV/CVC code etc.)
On other hand I remember that at moment here in SmartStore we have a generic card payment method, but now I did not found the source of this plugin to use as starting point for a new one.
Geschrieben: 23 March 2015 - 12:09
Marcus Gesing
Smartstore AG
Geschrieben: 23 March 2015 - 12:49
So generic card is included in offline payment? In this case I have to add a (new) provider class here ?
L.E.
And PaymentMethodBase in which plugin is implemented?
Geschrieben: 23 March 2015 - 13:49
No, you have to create your own plugin. SmartStore.OfflinePayment is intended for non payment gateway methods.
Marcus Gesing
Smartstore AG
Geschrieben: 24 March 2015 - 08:44
The payment plugins are at base web apps? I ask this because the nop based plugin that I try to convert is class library.
Geschrieben: 24 March 2015 - 11:47
Yes, they are. Maybe this information could be helpful.
Marcus Gesing
Smartstore AG
Geschrieben: 27 March 2015 - 10:00
Finally I somehow finish to port the plugin example from nopCommerce to SmartStore (I converted from Class Library to Web App, and I have no build errors), but I have some issues:
1. When I build the solution, in smartstore\web\plugins\SmartStore.PlatiOnline is copied only the SmartStore.PlatiOnline.dll resulted, and no the help files\folders such Views, Content, Localization. Also are copied the related System.Web.*.dll and I don't know why (this makes much larger the package)
2. When I enter in plugin management, I never see my plugin, no matter how many times I hit "Reload List of Plugins"
3. If I try to build the all web package using ClickToBuild.cmd I have errors, but if I exclude my plugin from solution no. Anyway if I build from Visual Studio, I don't have
Geschrieben: 27 March 2015 - 12:32
Marcus Gesing
Smartstore AG
Geschrieben: 27 March 2015 - 13:17
Thank you
I solved issue 1, now is build with all the files and without build errors.
In what concerns the name, initially was other, I changed after I observed that all plugin are prefixed as SmartStore.NameOfPlugin
As I explained, I started from the plugin for nop that was not web application but class library.
I add a new (empty) web application project under plugins folder, and rebuild all from scratch (I have to note that I tested the plugin with nop for being sure that it works, and it works)
I corrected all the references and usings in code, and I have no error at build level. Here I have to say that the empty project was targeted for dot.net 4.6 but all other smartStore plugins are targeted for 4.5 . If I change this also to 4.5 I have build errors.
OK, next step I launch the shop from visual studio, I go to plugin mamangement, hit "Reload List of Plugins", nothing happens, but if I go to System -> Warnings, there I can see a "Payments.PlatiOnline' plugin is incompatible with your SmartStore.NET version. Delete it or update to the latest version." warning.
I noticed yesterday a similar behaviour when I made tests with original plugin in nop. It is not clear for me how I sorted out of this, anyway it was a sequence of clear solution -> rebuild solution, and clear cache of browser, and finally it works. But here in SmartStore still not work.
L.E.
I find that it was unavailable because of the description.txt file . It was in nop format
Now is visible, it can be installed, but at this step it can't be activated: "Activating this payment method is forbidden by the plugin."
Geschrieben: 27 March 2015 - 14:22
Marcus Gesing
Smartstore AG
Geschrieben: 27 March 2015 - 15:02
Where in my plugin I have to implement this? At first sight I did not find this in other payment plugins for having an idea how to do this.
Anyway, at this level I have this aspects that are not clear to me:
Even if is installed (but not active) my plugin don't have the "Configure" button if I go to "Admin/Payment/Providers" (Payment Methods menu entry)
I don't know how to bind my custom logo icon of payment provider. Is displayed the generic credit card icon instead. I have provided in folder Contents an icon as icon.png but it not helps.
It's not clear to me if necessary (and if, how to provide) to have the resources.xx-XX.xml file in Localization folder,
Maybe are also other issues, but I don't know because I am stuck here.
Geschrieben: 27 March 2015 - 17:06
Marcus Gesing
Smartstore AG
Geschrieben: 30 March 2015 - 10:17
I search for PaymentMethodBase.IsActive and I did not find this anywhere in solution. I succeeded to make it configurable, but I did not find how to activate.
L.E.
I find in DependencyRegistrat.cs (e.g. In PayPal, ) somwthing related to this:
builder.RegisterType<PayPalExpressCheckoutFilter>().AsActionFilterFor<CheckoutController>(x => x.PaymentMethod()).InstancePerRequest();
but for example in OfflinePayment the approach is different, in Plugin.cs is a method Install() (and paired with method Uninstall() )
So what is in fact the way for allowing Install for my plugin. Regarding to first approach, my plugin does not implement nothing related to Filters.
Geschrieben: 30 March 2015 - 10:48
Marcus Gesing
Smartstore AG
Geschrieben: 30 March 2015 - 11:55
Geschrieben: 30 March 2015 - 18:11
public ActionResult CancelOrder(FormCollection form) { var order = _orderService.SearchOrders(_storeContext.CurrentStore.Id, _workContext.CurrentCustomer.Id, null, null, null, null, null, null, null, null, 0, 1).FirstOrDefault(); if (order != null) { return RedirectToAction("Details", "Order", new { id = order.Id, area = "" }); } return RedirectToAction("Index", "Home", new { area = "" }); }
Another way would be to use an INotifier message to display gateway messages. In an action method you can use "NotifySuccess" for example.
Marcus Gesing
Smartstore AG
Geschrieben: 24 April 2015 - 11:21
Geschrieben: 24 April 2015 - 16:37
Contributing is easy:
Murat Cakir
SmartStore AG