Payments - COD

Apr 7, 2010 at 1: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?

 

Regards,

Igor

Coordinator
Apr 8, 2010 at 7: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" ?>
<root>
  <gateways>  
  <gateway ref="SIPS">
    <name>SIPS</name>
    <assembly>NEvoweb.DNN.Modules.NB_Store.GatewaySIPS</assembly>
    <class>NEvoWeb.Modules.NB_Store.Gateway.GatewaySIPS</class>
  </gateway>
    <gateway ref="Paypal">
      <name>Paypal</name>
      <assembly>NEvoweb.DNN.Modules.NB_Store.GatewayPayPal</assembly>
      <class>NEvoWeb.Modules.NB_Store.Gateway.GatewayPayPal</class>
    </gateway>
    <gateway ref="PxPay">
      <name>PxPay</name>
      <assembly>NEvoweb.DNN.Modules.NB_Store.GatewayPxPay</assembly>
      <class>NEvoWeb.Modules.NB_Store.Gateway.GatewayPxPay</class>
    </gateway>
    <gateway ref="PayBox">
      <name>PayBox</name>
      <assembly>NEvoweb.DNN.Modules.NB_Store.GatewayPayBox</assembly>
      <class>NEvoWeb.Modules.NB_Store.Gateway.GatewayPayBox</class>
    </gateway>
    <gateway ref="SPplus">
      <name>SPplus</name>
      <assembly>NEvoweb.DNN.Modules.NB_Store.GatewaySPplus</assembly>
      <class>NEvoWeb.Modules.NB_Store.Gateway.GatewaySPplus</class>
    </gateway>
    <gateway ref="DIBS">
      <name>DIBS</name>
      <assembly>NEvoweb.DNN.Modules.NB_Store.GatewayDIBS</assembly>
      <class>NEvoWeb.Modules.NB_Store.Gateway.GatewayDIBS</class>
    </gateway>    
  <gateway ref="COD">
    <name>COD</name>
    <assembly>NEvoweb.DNN.Modules.NB_Store.GatewayCheque</assembly>
    <class>NEvoWeb.Modules.NB_Store.Gateway.GatewayCheque</class>
  </gateway>

    </gateways>
    </root>

Regards,

Dave.

Coordinator
Apr 8, 2010 at 7: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 10: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:

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 ---

 

Regards,

Igor

 

Coordinator
Apr 8, 2010 at 11:53 AM

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.

Regards,

Dave.

 

Apr 8, 2010 at 12:03 PM

Hi Dave!

do you have some tutorial how to do it.

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

 

Regards,

Igor

Coordinator
Apr 8, 2010 at 12: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 vb.net you should be OK.

Regards,

Dave

May 13, 2013 at 2:33 PM
Hi,

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
Coordinator
May 13, 2013 at 2: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.
Regards
Rob
Coordinator
May 14, 2013 at 7:48 AM
Hi,

On this page...

https://nbstore.codeplex.com/releases/view/34143

you will find these examples...
  • HowToCreatePaymentProvider.pdf
  • ExampleGateway_source.zip
  • ExampleGatewayCSharp_WithNotifyProvider.zip
have a look at these. these are example of full gateways I think!...you 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.

\DesktopModules\NB_Store\Providers\Gateway\GatewayCheque

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.

Regards,
Dave.