an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > Add 3% processing fees when payment method is C...
Last Post 9/28/2009 12:46:04 PM By bansal_db. 20 replies.
Page 1 of 2 (21 posts) << First < Prev 1 2 Next > Last >> 
9/11/2009 1:05:26 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Add 3% processing fees when payment method is Credit Card
Hey Luke,
 
Is there a way to add 3% processing fees, when the payment method is GoogleCheckout or CreditCard?
 
The majority of our orders are COD, so we don't want to add 3% to the item price. Is there a way to add it to only Credit Card Payments?
 
Thanks
 
-D
9/14/2009 2:51:07 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Add 3% processing fees when payment method is Credit Card
Luke,
 
Is there a way to this?
 
Thanks
9/14/2009 4:00:35 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Add 3% processing fees when payment method is Credit Card
Yes, you can create your own custom OrderTotalProvider and add it to the list of OrderTotalProvider. Please use TaxOrderTotalProvider.cs as the template. Let me know if you have further questions.
DotShoppingCart Staff
9/24/2009 7:07:18 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Add 3% processing fees when payment method is Credit Card
Luke,
 
I am not sure where all i will have to make the changes.
 
I understand this much, I will have to create a new OrderTotalProvider which will add 3% processing fees to the order total. I am not sure where in the code i will be making changes to call this order provider if payment method is Credit Card?
 
Thanks
 
9/24/2009 8:55:27 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Add 3% processing fees when payment method is Credit Card
Now you just need to add your order total provider to the list. In DSC.config file, just add a new line to the following section. Make sure you sort order is correct.
 
<orderTotalServiceConfigurationdefaultProvider="">
        <providers>
            <clear />
            <add enabled="True" sortOrder="0" name="SubtotalOrderTotalProvider" type="DotShoppingCart.Commercial.OrderTotal.SubtotalOrderTotalProvider" />
            <add enabled="True" sortOrder="10" name="ShippingOrderTotalProvider" type="DotShoppingCart.Commercial.OrderTotal.ShippingOrderTotalProvider" />
            <add enabled="True" sortOrder="100" name="TaxOrderTotalProvider" type="DotShoppingCart.Commercial.OrderTotal.TaxOrderTotalProvider" />
            <add enabled="True" sortOrder="2147483647" name="GrandTotalOrderTotalProvider"  type="DotShoppingCart.Commercial.OrderTotal.GrandTotalOrderTotalProvider" />
        </providers>
</orderTotalServiceConfiguration>
DotShoppingCart Staff
9/24/2009 9:07:09 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Add 3% processing fees when payment method is Credit Card
And how do i check the payment type?
9/24/2009 9:24:37 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Add 3% processing fees when payment method is Credit Card
Good question. There are a couple of ways.
1) Change GetOrderTotal method in OrderTotalProvider abstract class to add a new parameter for payment method. You will need to change all the order total providers as well.
2) Use Session. Set Session["paymentMethod"] = paymentOption.CheckoutPaymentType in Store\OnePageCheckout.ascx.cs and then you can get it back in your order total provider
DotShoppingCart Staff
9/25/2009 8:30:22 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Add 3% processing fees when payment method is Credit Card
I added this on the OnePageCheckout.ascx.cs
 
  Session["paymentMethod"]=paymentOption.CheckoutPaymentType;
 
How do i retrive this on the Order Total Provider? There is no session varibale present on that page.
9/25/2009 9:05:00 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Add 3% processing fees when payment method is Credit Card
Just add System.Web to your project reference and use HttpContext.Current.Session.
DotShoppingCart Staff
9/25/2009 9:51:45 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Add 3% processing fees when payment method is Credit Card
Luke,
 
What values are passed to the googleCheckout? Is it the sub total or the final total for the order? Because i need to pass this 3% processing fees that i calculated to google checkout. How would i do that?
 
Thanks
 
9/25/2009 10:05:24 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Add 3% processing fees when payment method is Credit Card
Another thing is, the order total doesn't refesh after the payment method is changed. How would i do that?
 
Because by default the payment method that is selected is credit card and the new order total provider adds the processing fees to the order total but if I change the payment method to offline payment, I want the processing fees to go away. How do i refesh the order total whenever the payment method is changed like it does for shipping?
 
Thanks
Page 1 of 2 (21 posts) << First < Prev 1 2 Next > Last >>