Payments - COD

Apr 7, 2010 at 2:38 PM

Hi all,

Is it possible to add beside pay by cheque also pay by COD - Cash On Delivery.

I would like that my customer can choose between cheque and COD.

Is it possible?




Apr 8, 2010 at 8:28 AM

Hi Igor,

If your not using any other payment methods you could try duplicating the cheque gateway in the payment provider xml file "gatewayproviders.xml" any then you'll have 2 pay by cheque buttons, obviously you can then change one of them to the COD text you want....somthing like ....

<?xml version="1.0" encoding="utf-8" ?>
  <gateway ref="SIPS">
    <gateway ref="Paypal">
    <gateway ref="PxPay">
    <gateway ref="PayBox">
    <gateway ref="SPplus">
    <gateway ref="DIBS">
  <gateway ref="COD">




Apr 8, 2010 at 8:30 AM

Just to add...I've not tried this and it may not work, you'll have to give it a go......Hopefully we'll be able to put in support for multiple gateways soon and then the problem can be solved with a COD provider being created.


Apr 8, 2010 at 11:25 AM

Hi Dave!


I change xml file and put Payment Gateway: COD , but I get an error by last page on checkout, when i will choose payments.


Error: NB_Store_Checkout is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Unable to cast object of type 'NEvoWeb.Modules.NB_Store.Gateway.GatewayCheque' to type 'NEvoWeb.Modules.NB_Store.GatewayInterface'. ---> System.InvalidCastException: Unable to cast object of type 'NEvoWeb.Modules.NB_Store.Gateway.GatewayCheque' to type 'NEvoWeb.Modules.NB_Store.GatewayInterface'. at NEvoWeb.Modules.NB_Store.GatewayInterface.CreateProvider(Int32 PortalID) at NEvoWeb.Modules.NB_Store.GatewayInterface.Instance() at NEvoWeb.Modules.NB_Store.CheckOut.AddBankGateway() at NEvoWeb.Modules.NB_Store.CheckOut.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---





Apr 8, 2010 at 12:53 PM

Hi Igor,

Yes sorry I should have thought that it's using a different interface, this will never work!!

Therefore the only way I can think of doing this without changing NB_Store code is to create your own gateway provider that does the COD.




Apr 8, 2010 at 1:03 PM

Hi Dave!

do you have some tutorial how to do it.

I'm not skilled programmer, I know some basic/normal stuff.




Apr 8, 2010 at 1:25 PM

Hi Igor,

Contact me through codeplex and I'll send you some examples of what I think you need to do.....luckily you don;t have to do the full blown gateway, just a copy of the cheque gateway which is a lot simpler to build and test.  As long as you know how to do basic changes and compile you should be OK.



May 13, 2013 at 3:33 PM

and many thanks to Rob for such a great module. Even I'm not a code expert, more a designer with basic code skills, I succed to adjust everything to my needs. Exept…

I have read many discussinons about payment providers but unfortunatelly I'm still in the blind circle…. From manualls, instructions about how to create payment provider, to source code and discussions. I would only like to add one manual payment button for cash on delivery. So – to run paypal gateway, cheque gateway and COD gateway. I also upgrade a store to 2.3.5 (running site on DNN 6.2.6) hoping I will find a more simple solution for my problem. Thought this is just a few rows of code – to copy cheque gateway code and adjust it to COD but looks I was wrong…

I would be really glad and thankful if someone can advice me with a necessary step to step procedure.

Regards, Jure
May 13, 2013 at 3:47 PM
Hi Jure ,
The main credit goes to Dave for the store, and he will point you in the right direction with this query, however you need to start new threads with new questions, even if they are about the same or similar topic.
May 14, 2013 at 8:48 AM

On this page...

you will find these examples...
  • HowToCreatePaymentProvider.pdf
have a look at these. these are example of full gateways I think! need something a little less, because you don't need to link out to a actual payment provider, so all that code can be removed. you just need to do what the built in cheque provider is doing.

Look at the source of NB_Store.


in there is a project that does the pay by cheque, you will need to use the interface more like a normal payment provider, so basically you need to do a hybrid of the 2. The code from the cheque interface, but the interface of the payment gateways.

Good Luck... :-)

PM me if you get into trouble, if you do the hard work I'll guide you!....but start off by creating a gateway that does nothing and see if you can integrate it into NB_Store like you would a normal gateway.