Advertisement
Guest User

Untitled

a guest
May 15th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. public function genTopupUrl($amount)
  2. {
  3. $amountk = $amount * 100;
  4. $order_id = 'adsdasdassda'; //some uuid FIXME
  5.  
  6. $back_url = "http://2pro-trener.ru/index.php?page=compleat&orderNumber=" + $order_id;
  7. // PAYMENTGATE_URL
  8. // init guzzle
  9. $requester = new Client([
  10. 'headers' => [
  11. 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*;q=0.8',
  12. 'Accept-Language: ru,en-us;q=0.7,en;q=0.3',
  13. 'Accept-Encoding: deflate',
  14. 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7'
  15. ]
  16. ]);
  17.  
  18. $res = $requester->request(
  19. 'POST',
  20. "https://3dsec.paymentgate.ru/ipay/rest/register.do?userName=".Constants::PAYMENTGATE_MERCHANT_USER."&password=".Constants::PAYMENTGATE_MERCHANT_PASSWORD."&language=ru&amount=".$amountk."&returnUrl=".$back_url,
  21. ['json' => [
  22. 'jsonParams' => [
  23. "email" => '13',
  24. "phone" => '132',
  25. "contact" => '24234'
  26. ]
  27. ]
  28. ]
  29. );
  30. return $resJson = $res->getBody()->getContents();;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement