Custom Plugin holding multiple payment Methods

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Dear sir,

I want to develop a plugin in nopapplication. Which will provide me these functionalities:

My own custom plugin will hold 3 payment methods of nopcommerce application. Checkout procedure will call the specific payment method by choosing and then make the transaction for an order.

I am facing issue in calling the specific payment method(i.e. Purchase Order) from my plugin.

I have given the systemName in description.txt : nop.CustomPayments but when I am using GetPluginDescriptorBySystemName(nop.CustomPayments) but it is always calling the Plugin Payment Method not the others method of my own plugin.

How can I call the other payment methods of my plugin from onepagecheckout.

Please give me suggestions to fulfill my requirements.

thanks and regards
Anver Sadat
8 years ago
It is done by interface. Your plugin class implement that method of interface so thats why it call that method.
8 years ago
anik1991 wrote:
It is done by interface. Your plugin class implement that method of interface so thats why it call that method.


Hi anik,
Thank you for your quick reply!
But my query is what is the way to call the individual payment method on the selection of a specific method like purchase order. As generally, the checkout controller calls the purchaseorder payment plugin constructor method
But if one to call the paypal direct method from my checkout controller in my plugin then how it will call the paypal Direct method as it will by default call the payment method from the systemName that is purchaseOrder.
I have copied all the necessary library and class files for purchaseorder in my custom plugin like the nop has implemented the same and for other payment method also.

The main  issue is how to find a way to call the individual payment method of my custom plugin from check out controller? As the payment method Instance is called from the SystemName(mentioned in description.txt file) of the plugin.

Sincerely
Anver Sadat
8 years ago
anversadat21 wrote:
It is done by interface. Your plugin class implement that method of interface so thats why it call that method.

Hi anik,
Thank you for your quick reply!
But my query is what is the way to call the individual payment method on the selection of a specific method like purchase order. As generally, the checkout controller calls the purchaseorder payment plugin constructor method
But if one to call the paypal direct method from my checkout controller in my plugin then how it will call the paypal Direct method as it will by default call the payment method from the systemName that is purchaseOrder.
I have copied all the necessary library and class files for purchaseorder in my custom plugin like the nop has implemented the same and for other payment method also.

The main  issue is how to find a way to call the individual payment method of my custom plugin from check out controller? As the payment method Instance is called from the SystemName(mentioned in description.txt file) of the plugin.

Sincerely
Anver Sadat


Hi Anver Sadat,

If you want to make 3 different selection at payment methods page, probably you need to create 3 different projects and build 3 different plugins to install it.
8 years ago
eshiply wrote:
If you want to make 3 different selection at payment methods page, probably you need to create 3 different projects and build 3 different plugins to install it.


Thank you eshiply,
Yes u are probably right at your words. Assuming the same to implement the same concept to apply the functionality.
We have to explicitly develop 3 separate payment methods as projects to get the desired results as it supposed to be correctly aligned.

But i think nopcommunity should provide this feature to enhance the payment processing in beyond level and make the things comfort and more efficient to fulfill the customer's expectations.

Sincerely,
Anver Sadat
8 years ago
It's not clear to me what "feature" you are asking for.  Is it to just have a single Project (Visual Studio), that houses multiple Payment Methods? (Which would be a developer feature.  What feature do you need for the customer?)
8 years ago
New York wrote:
It's not clear to me what "feature" you are asking for.  Is it to just have a single Project (Visual Studio), that houses multiple Payment Methods? (Which would be a developer feature.  What feature do you need for the customer?)


Hi NewYork,
Hoping you will be fine.
As you said in your reply:
Is it to just have a single Project (Visual Studio), that houses multiple Payment Methods?
Me: Yes
I want the same feature encapsulating the multiple payment methods and those will be called from nop onepagecheckout payment page depending which method is chosen by the Customer for an Order.
But my issue is related to the structure of nop application that it calls the payment method by the plugin instance(An Independent Way) not from the Payment's Controller basis that is the main requirement.
If i want to call the other Payment method then i will have to develop another plugin with the name of that payment Method but i want to include that Method in existing Plugin not as a separate Plugin.

Any suggestion in your mind.

Sincerely
Anver Sadat
8 years ago
You need to have separate plugins.  You could create a shared library/assembly with common code (or even non-common code ;), and then but that .dll in the main \bin folder of the production site.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.