Advertisement
Guest User

сбербанк payment

a guest
Jun 17th, 2016
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(E_ALL);
  4. header("Content-Type: text/html; charset=utf-8");
  5.  
  6. $username = 'логин';
  7. $password = 'пароль';
  8.  
  9. $rub = 643;
  10. $ammount = 100;
  11.  
  12. $returnUrl = "success.html";
  13.  
  14. $API_URI = 'https://securepayments.sberbank.ru/payment/rest/';
  15. $API_URI_TEST = 'https://3dsec.sberbank.ru/payment/rest/';
  16.  
  17. $orderId = 'GTE567';
  18.  
  19. $request = $API_URI_TEST.'/register.do?amount='.$ammount.'&currency='.$rub.'&language=ru&orderNumber='.$orderId.'&password='.$password.'&returnUrl='.$returnUrl.'userName='.$username.'&pageView=DESKTOP&merchantLogin=merch_child';
  20.  
  21.  
  22. $response = file_get_contents($request);
  23. $res = json_decode($response);
  24.  
  25. echo "<pre>";
  26. print_r($res);
  27. echo "</pre>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement