Developer forum

Forum » Development » DIBS Payment currency

DIBS Payment currency


Reply

This Ecommerce shop operates only with Euro valuta. But according to my info DIBS will only accept DKR as valuta if the user chooses to pay with Dankort. How do i handle this ?


 


Thanx in advance.


Replies

 
Nicolai Høeg Pedersen
Reply
jes@vesterkopi.dk wrote:


This Ecommerce shop operates only with Euro valuta. But according to my info DIBS will only accept DKR as valuta if the user chooses to pay with Dankort. How do i handle this ?




 




Thanx in advance.




Create two payment gateways using the same information. One for Credit Cards and one for other payments (I guess you also have Netbanking and so on?). Use two different templates and send the amount as DKK when not using credit cards.
 
Reply

Thanks for the reply Nicolai.


 


I've triede creating two similar gateways with different templates as you suggested. 1 normal and 1 where i hardcode the danish currency code in the DIBS template. But it still leaves me short of the solution. I also need to convert the amout from EUR to DKK.


 


- Would it be better to make use of extensibility/extenders and change the amount/currency based on the user info (Order.Delivery.Country) ? Perhaps create a new Gatewayprovider, OrderExtender ect ?

 
Nicolai Høeg Pedersen
Reply

A simple implementation could be


 


document.getElementById("amount").value =


parseInt(((document.getElementById("amount").value/100)/7.5)*100);


 


Field amount contains the price in an integer with no commas so 100,25 kroners would in amount field for DIBS be 10025 - this is why the division by 100 to start with. 7.5 is the exchange rate.

 

You must be logged in to post in the forum