Use user.Locale.Language instead of user.Language to sign with Redsys

user.Language is the language set in the database for the user, that in
the case of guests is always going to be ‘und’, that means Redsys would
select Spanish for everyone.
This commit is contained in:
jordi fita mas 2023-10-27 12:31:32 +02:00
parent 007f401d33
commit a37d11eed9
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ func makeReservation(w http.ResponseWriter, r *http.Request, user *auth.User, co
SuccessURL: fmt.Sprintf("%s://%s/%s/booking/success", schema, authority, user.Locale.Language),
FailureURL: fmt.Sprintf("%s://%s/%s/booking/failure", schema, authority, user.Locale.Language),
NotificationURL: fmt.Sprintf("%s://%s/%s/booking/notification", schema, authority, user.Locale.Language),
ConsumerLanguage: user.Language,
ConsumerLanguage: user.Locale.Language,
}
signed, err := redsys.SignRequest(r.Context(), conn, company, request)
if err != nil {