update orderflow
This commit is contained in:
@@ -43,6 +43,16 @@ func getLocale(country string) string {
|
||||
return "sv-se"
|
||||
}
|
||||
|
||||
// getCountryFromCurrency is the reverse of getCurrency, used by server-to-server
|
||||
// callbacks (e.g. the Adyen webhook) that carry the settled currency but not the
|
||||
// shopper's host/country.
|
||||
func getCountryFromCurrency(currency string) string {
|
||||
if strings.EqualFold(currency, "NOK") {
|
||||
return "no"
|
||||
}
|
||||
return "se"
|
||||
}
|
||||
|
||||
func getCountryFromHost(host string) string {
|
||||
if strings.Contains(strings.ToLower(host), "-no") {
|
||||
return "no"
|
||||
|
||||
Reference in New Issue
Block a user