Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP] Problem z &currency i ¤cy
DannyM
post
Post #1





Grupa: Zarejestrowani
Postów: 507
Pomógł: 2
Dołączył: 30.10.2003
Skąd: Poznań

Ostrzeżenie: (10%)
X----


Mam wyliczy sume hash i mianowicie problemem jest &currency bo na siłe zmienia mi na ¤cy i suma wylicza sie bledna


.'&session_id='.$_SERVER["REMOTE_ADDR"]
.'&amount='.$amount

ŹLE .'¤cy='.$order_info['currency_code']

POWINNO BYĆ ."&currency=".$order_info['currency_code']

Efekt wychodzi: &amount=60732¤cy=PLN&
Dodam, ze jak tylko usune currency to HASH jest prawidlowy. Niestety to pole jest wymagane i musze je umiescic

Probowalem htmlentities ale wtedy nadal hash jest bledny. Dawalem & #38; i efekt ten sam.
Jakis pomysl jak to przeskoczyc

Ten post edytował DannyM 29.05.2015, 14:15:14
Go to the top of the page
+Quote Post
markuz
post
Post #2





Grupa: Zarejestrowani
Postów: 1 240
Pomógł: 278
Dołączył: 11.03.2008

Ostrzeżenie: (0%)
-----


Możesz umieścić currency jako pierwszy parametr ?currency albo użyć urlencode
Go to the top of the page
+Quote Post
DannyM
post
Post #3





Grupa: Zarejestrowani
Postów: 507
Pomógł: 2
Dołączył: 30.10.2003
Skąd: Poznań

Ostrzeżenie: (10%)
X----


Cytat(markuz @ 29.05.2015, 15:28:33 ) *
Możesz umieścić currency jako pierwszy parametr ?currency albo użyć urlencode

Bardzo dobry pomysl ale niestety kolejosc ma znaczenie (IMG:style_emoticons/default/sad.gif)
Sprawdzilem tez urlencode i nic nie zminia

Ten post edytował DannyM 29.05.2015, 14:33:31
Go to the top of the page
+Quote Post
markuz
post
Post #4





Grupa: Zarejestrowani
Postów: 1 240
Pomógł: 278
Dołączył: 11.03.2008

Ostrzeżenie: (0%)
-----


To może czas na kod? Podaj kod, wynik i wstaw var_dump na wejściu urlencode oraz var_dump na wyjściu.
Go to the top of the page
+Quote Post
trueblue
post
Post #5





Grupa: Zarejestrowani
Postów: 6 806
Pomógł: 1828
Dołączył: 11.03.2014

Ostrzeżenie: (0%)
-----


Używasz http_build_query do budowania query string? Jeśli tak to użyj na nim urldecode.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 19:00