Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Integracja z DotPay
trifek
post
Post #1





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

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


Witajcie.
Mam pytanie dotyczące parametru signature w integracji z Dotpay.

Mam taki kod:
  1. private function generateSignature(Request $request, int $orderId, string $dotPayPrice, string $dotPayCurrency, string $dateTime, string $control, string $description, string $email, string $companyName, string $companeEmail): string
  2. {
  3. $pin = env('DOTPAY_PIN');
  4. $sign =
  5. $pin .
  6. env('DOTPAY_SHOP_ID') .
  7. //$_POST['operation_number'].
  8. //$_POST['operation_type'].
  9. 'new'.
  10. $dotPayPrice .
  11. $dotPayCurrency .
  12. //$_POST['operation_withdrawal_amount'].
  13. //$_POST['operation_commission_amount'].
  14. //$_POST['is_completed'].
  15. $dotPayPrice .
  16. $dotPayCurrency .
  17. $dateTime .
  18. //$_POST['operation_related_number'].
  19. $control .
  20. $description .
  21. $email .
  22. $companyName .
  23. $companeEmail;
  24. //$_POST['credit_card_issuer_identification_number'].
  25. //$_POST['credit_card_masked_number'].
  26. //$_POST['credit_card_expiration_year'].
  27. //$_POST['credit_card_expiration_month'].
  28. //$_POST['credit_card_brand_codename'].
  29. //$_POST['credit_card_brand_code'].
  30. //$_POST['credit_card_unique_identifier'].
  31. //$_POST['credit_card_id'].
  32. //$_POST['channel'].
  33. //$_POST['channel_country'].
  34. //$_POST['geoip_country'];
  35. $signature = hash('sha256', $sign);
  36. return $signature;
  37. }

dotPayPrice = kwota transakcji, $dotPayCurrency = waluta transakcji.


Według dotpay moje signature jest źle obliczane (otrzymuję inną wartość signature zwrotną od Dotpaya).

Wie ktoś może co mam nie tak w tej funkcji?
Go to the top of the page
+Quote Post

Posty w temacie


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: 25.12.2025 - 00:47