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:
parent
007f401d33
commit
a37d11eed9
|
@ -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),
|
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),
|
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),
|
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)
|
signed, err := redsys.SignRequest(r.Context(), conn, company, request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue