Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Płatności payu
trifek
post
Post #1





Grupa: Zarejestrowani
Postów: 340
Pomógł: 0
Dołączył: 28.09.2015

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


Witam serdecznie,
Próbuję podłączyć płatności payu - ale chyba robię coś nie tak sad.gif
Mam taki kod:
  1. $id_payu = 123456; // klucz payu
  2. $zlacz = $zlacz."13a980d4f851f3d9a1cfc792fb1f5e50"; //drugi klucz
  3. $podpis = hash("md5", $zlacz);
  4. $OpenPayU_Signature = "sender=".$id_payu.";algorithm=MD5;signature=".$podpis;
  5.  
  6.  
  7. <form method="POST" action="https://secure.payu.com/api/v2_1/orders" id="payu-payment-form" class="" name="nazwa_formularza">
  8. <input type="hidden" name="notifyUrl" value="<?php echo $gt_myurl;?>order/OrderNotify.php" />
  9. <input type="hidden" name="continueUrl" value="<?php echo $gt_myurl;?>/cms/admin/start.html?strona=edytuj_moje_dane&rekord=<?php echo $_GET['rekord'];?>&stan=ok" />
  10. <input type="hidden" name="customerIp" value="<?php echo IP_prawdziwe();?>" />
  11. <input type="hidden" name="merchantPosId" value="<?php echo $id_payu;?>" />
  12. <input type="hidden" name="description" value="Przedłużenie abonamentu firmy <?php echo baza_odczyt($row['nazwa']);?>" />
  13. <input type="hidden" name="currencyCode" value="PLN" />
  14. <input type="hidden" name="totalAmount" value="<?php echo $kwota_przedluzenia;?>" />
  15. <input type="hidden" name="extOrderId" value="<?php echo baza_odczyt($row['gt_id']);?>.<?php echo rand(1000000,10000000000); ?>" />
  16. <input type="hidden" name="products[0].name" value="Przedłużenie abonamentu firmy <?php echo baza_odczyt($row['nazwa']);?>" />
  17. <input type="hidden" name="products[0].unitPrice" value="<?php echo $kwota_przedluzenia;?>" />
  18. <input type="hidden" name="products[0].quantity" value="1" />
  19. <input type="hidden" name="buyer.email" value="<?php echo baza_odczyt($row['email']);?>" />
  20. <input type="hidden" name="buyer.phone" value="<?php echo baza_odczyt($row['tel']);?>" />
  21. <input type="hidden" name="buyer.firstName" value="<?php echo baza_odczyt($row['nazwa']);?>" />
  22. <input type="hidden" name="OpenPayu-Signature" value="<?php echo $OpenPayU_Signature;?>" /><button type="submit" id="fwefwefw" class="fwefwefw"></button>
  23. </form>


W wyniku tego kodu otrzymuję przykładowo taki formularz:
  1.  
  2. <form method="POST" action="https://secure.payu.com/api/v2_1/orders" id="payu-payment-form" class="" name="nazwa_formularza">
  3. <input type="hidden" name="notifyUrl" value="http://127.0.0.1/lunchtime/order/OrderNotify.php" />
  4. <input type="hidden" name="continueUrl" value="http://127.0.0.1/?stan=ok" />
  5. <input type="hidden" name="customerIp" value="127.0.0.1" />
  6. <input type="hidden" name="merchantPosId" value="123456" />
  7. <input type="hidden" name="description" value="xxxxxxxxxxx" />
  8. <input type="hidden" name="currencyCode" value="PLN" />
  9. <input type="hidden" name="totalAmount" value="10000" />
  10. <input type="hidden" name="extOrderId" value="1.8034607548" />
  11. <input type="hidden" name="products[0].name" value="xxxxxxxxxxx" />
  12. <input type="hidden" name="products[0].unitPrice" value="10000" />
  13. <input type="hidden" name="products[0].quantity" value="1" />
  14. <input type="hidden" name="buyer.email" value="email@wp.pl" />
  15. <input type="hidden" name="buyer.phone" value="telefon" />
  16. <input type="hidden" name="buyer.firstName" value="imii" />
  17. <input type="hidden" name="OpenPayu-Signature" value="sender=123456;algorithm=MD5;signature=09be80f7f539182c97f2883e8c89fb28" /><button type="submit" id="fwefwefw" class="fwefwefw"></button>
  18. </form>
  19.  


Czy to jest poprawne?
Payu zgłasza mi błąd: Dostęp zabroniony.

Nie wiem czy to kwestia danych testowych - czy coś mam nie tak z tymi podpisami :/
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 19.08.2025 - 19:44