Advertisement
Guest User

Untitled

a guest
Apr 18th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.48 KB | None | 0 0
  1. <?php
  2. $referencecode=addslashes($_POST['refID']);
  3. $username=addslashes($_POST['username']);
  4. $password=addslashes($_POST['password']);
  5.  
  6. $xml='<?xml version="1.0" encoding="UTF-8"?>
  7. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:WSPINIntf-IWSPIN" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  8.  <SOAP-ENV:Body>
  9.    <ns1:PaymentStatus>
  10.    <wsuser xsi:type="xsd:string">test@payzpin.com</wsuser>
  11.         <wspass xsi:nil="true">test123*!</wspass>
  12.         <apikey xsi:nil="true">AUB0UDB4VI9PR7DQCGX0IO4ENH732D4ACQS5Y48YVNUX99BALI</apikey>
  13.      <username xsi:nil="true">'.$username.'</username>
  14.      <password xsi:nil="true">'.$password.'</password>
  15.      <referencecode xsi:nil="true">'.$referencecode.'</referencecode>
  16.    </ns1:PaymentStatus>
  17.  </SOAP-ENV:Body>
  18. </SOAP-ENV:Envelope>';
  19.  
  20. $url="http://188.165.81.253:8080/myapp/WSPIN.dll/soap/IWSPIN";
  21.  
  22.  
  23. $ch = curl_init($url);
  24. //curl_setopt($ch, CURLOPT_MUTE, 1);
  25. curl_setopt($ch, CURLOPT_POST, 1);
  26. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:  text/xml; charset=utf-8'));
  27. curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml");
  28. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  29. curl_close($ch);
  30. $output = curl_exec($ch);
  31. if(curl_exec($ch) === false)
  32. {
  33.     echo 'Curl error: ' . curl_error($ch);
  34. }
  35. var_dump($output);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement