.net - What is the frequency to update exchange rate for eCommerce website with multiple currencies? -
we including third party api convert currency per country selected in dropdown. steps are
1) set currency in session/cookie 2) have lookup table of currency conversions stored somewhere (e.g. database) - convert new price using lookup table depending on whichever currency set in session/cookie.
unable decide how set cookie expiry time lookup table currency conversion. good, if twice in day. per our requirement don't need exchange rate updating every request.
just store last data in session well. session["lastconversiondate"] = datetime.now
, , upon next request test whether ((datetime)session["lastconversiondate"]) < datetime.now.addminutes(-expirationinminutes)
.
Comments
Post a Comment