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