Adding custom Payment Module

My online store running on CS cart 2.1.4 already has paypal configured for accepting US$ payments. I am planning to add even my local currency and a corresponding payment gateway module. I have the following questions :


  1. How do I display the price in my local currency only to my local customers and guide them to this payment module.
  2. How do I make the Paypal Payment option INVISIBLE to other customers. I don't want Paypal payment option to be available to my local customers as it doesn't support my local currency (Indian Rupees) yet.
  3. Any possibility of separating the invoicing system?



    Is it advisable to accept orders in both the currencies on the same website or is it advisable to make a separate website for the local currency in the long run. But that would mean doing all the SEO and other stuff twice. Lot of confusion due to lack of knowledge. Any help will be appreciated.

You are going to run into many different issues.



The way the cart is designed is that the store has a single primary currency. The front-end (customer view) can be set to allow them to see prices in a variety of different currencies. However, this is really “view only”. All transactions and all back-end functions are done in the primary currency of the store. All customer views (pages, invoices, etc.) are shown to them in their selected currency.



So you can't really break things out into separate currencies for payment without customization. I.e. you'll have to insert code that will convert the store's primary currency value to the currency value for the payment processor and then convert it back again when you get a response. I.e. if you've set your stores primary currency to Rupees then you'd have to divide an order's 'order_total' by 46 to get the dollar amount for sending to Paypal for USD.



It can be done, but requires a conversion of the order_total based on the store currency and the currency of the payment provider.



As far as making a payment type invisible, you can do this with a hook if you know the payment_id of the methods you want to remove.

[quote name='tbirnseth' timestamp='1323459627' post='127612']

You are going to run into many different issues.



The way the cart is designed is that the store has a single primary currency. The front-end (customer view) can be set to allow them to see prices in a variety of different currencies. However, this is really “view only”. All transactions and all back-end functions are done in the primary currency of the store. All customer views (pages, invoices, etc.) are shown to them in their selected currency.



So you can't really break things out into separate currencies for payment without customization. I.e. you'll have to insert code that will convert the store's primary currency value to the currency value for the payment processor and then convert it back again when you get a response. I.e. if you've set your stores primary currency to Rupees then you'd have to divide an order's 'order_total' by 46 to get the dollar amount for sending to Paypal for USD.



It can be done, but requires a conversion of the order_total based on the store currency and the currency of the payment provider.



As far as making a payment type invisible, you can do this with a hook if you know the payment_id of the methods you want to remove.

[/quote]



Thanks a ton for the lowdown on my issue. With all the invoices, advertising, promotions being different is it advisable to build and operate another site for the local currency? How do other stores do this? Also will the scenario change if use a separate payment processor for each of these currencies. Or could the CS-cart Multi-store edition be any solution for this?



When it comes to SEO, does Google punish if there are domain.com and domain.in with almost the same content?