Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.89 KB | None | 0 0
  1. $state = $_REQUEST[state];
  2. $type = $_REQUEST[type];
  3. $street = $_REQUEST[street];
  4. $city = $_REQUEST[city];
  5. $zipcode = $_REQUEST[zipcode];
  6. $fname = $_REQUEST[fname];
  7. $lname = $_REQUEST[lname];
  8. $email = $_REQUEST[email];
  9. $phone = $_REQUEST[phone];
  10. $estCreditScore = $_REQUEST[estCreditScore];
  11. $estLoanAmount = $_REQUEST[estLoanAmount];
  12. $estDownPayment = $_REQUEST[estDownPayment];
  13. $monthlyIncome = $_REQUEST[monthlyIncome];
  14. $ssn = $_REQUEST[ssn];
  15.  
  16. $output = htmlspecialchars("<REQUEST_GROUP MISMOVersionID="2.3.1"> <RECEIVING_PARTY _Name="8888"/> <REQUEST InternalAccountIdentifier="Identifier" LoginAccountIdentifier="acc" LoginAccountPassword="pass!"> <REQUEST_DATA> <CREDIT_REQUEST MISMOVersionID="2.3.1"> <CREDIT_REQUEST_DATA CreditReportRequestActionType="Submit" CreditReportType="Merge"> <CREDIT_REPOSITORY_INCLUDED _EquifaxIndicator="Y" _ExperianIndicator="Y" _TransUnionIndicator="Y"/> <CREDIT_SCORE_MODEL_NAME _Type="EquifaxBeacon"/> <CREDIT_SCORE_MODEL_NAME _Type="TransUnionEmpirica"/> </CREDIT_REQUEST_DATA> <LOAN_APPLICATION> <BORROWER BorrowerID="BOR01" _FirstName="$_REQUEST[fname]" _LastName="$_REQUEST[lname]" _PrintPositionType="Borrower" _SSN="$_REQUEST[ssn]"> <_RESIDENCE _StreetAddress="$_REQUEST[street]" _City="$_REQUEST[city]" _State="$_REQUEST[state]" _PostalCode="$_REQUEST[zipcode]"/> </BORROWER> </LOAN_APPLICATION> </CREDIT_REQUEST> </REQUEST_DATA> </REQUEST></REQUEST_GROUP>", ENT_XML1);
  17.  
  18.  
  19. $curl = curl_init();
  20.  
  21. curl_setopt_array($curl, array(
  22. CURLOPT_URL => "url/url/url",
  23. CURLOPT_RETURNTRANSFER => 1,
  24. CURLOPT_ENCODING => "",
  25. CURLOPT_MAXREDIRS => 10,
  26. CURLOPT_TIMEOUT => 30000,
  27. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  28. CURLOPT_CUSTOMREQUEST => "POST",
  29. CURLOPT_SSL_VERIFYHOST => false, //for testing on my dev machine only. To be removed before deployment
  30. CURLOPT_SSL_VERIFYPEER => false, //for testing on my dev machine only. To be removed before deployment
  31. CURLOPT_POSTFIELDS => $output,
  32. CURLOPT_HTTPHEADER => array(
  33. "Accept: */*",
  34. "Cache-Control: no-cache",
  35. "Connection: keep-alive",
  36. "Content-Type: text/xml",
  37. "Host: url/url",
  38. "User-Agent: PostmanRuntime/7.13.0",
  39. "accept-encoding: gzip, deflate",
  40. "content-length: 1426"
  41. ),
  42. ));
  43.  
  44. $response = curl_exec($curl);
  45. $err = curl_error($curl);
  46.  
  47. curl_close($curl);
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. if ($err) {
  55. echo "cURL Error #:" . $err;
  56. } else {
  57. echo $response;
  58. }
  59.  
  60. $state = htmlspecialchars($_REQUEST[state]);
  61. $type = htmlspecialchars($_REQUEST[type]);
  62. $street = htmlspecialchars($_REQUEST[street]);
  63. $city = htmlspecialchars($_REQUEST[city]);
  64. $zipcode = htmlspecialchars($_REQUEST[zipcode]);
  65. $fname = htmlspecialchars($_REQUEST[fname]);
  66. $lname = htmlspecialchars($_REQUEST[lname]);
  67. $email = htmlspecialchars($_REQUEST[email]);
  68. $phone = htmlspecialchars($_REQUEST[phone]);
  69. $estCreditScore = htmlspecialchars($_REQUEST[estCreditScore]);
  70. $estLoanAmount = htmlspecialchars($_REQUEST[estLoanAmount]);
  71. $estDownPayment = htmlspecialchars($_REQUEST[estDownPayment]);
  72. $monthlyIncome = htmlspecialchars($_REQUEST[monthlyIncome]);
  73. $ssn = htmlspecialchars($_REQUEST[ssn]);
  74.  
  75. $output = <<< XML
  76. <REQUEST_GROUP MISMOVersionID="2.3.1">
  77. <RECEIVING_PARTY _Name="8888"/>
  78. <REQUEST InternalAccountIdentifier="Identifier" LoginAccountIdentifier="acc" LoginAccountPassword="pass!">
  79. <REQUEST_DATA>
  80. <CREDIT_REQUEST MISMOVersionID="2.3.1">
  81. <CREDIT_REQUEST_DATA CreditReportRequestActionType="Submit" CreditReportType="Merge">
  82. <CREDIT_REPOSITORY_INCLUDED _EquifaxIndicator="Y" _ExperianIndicator="Y" _TransUnionIndicator="Y"/>
  83. <CREDIT_SCORE_MODEL_NAME _Type="EquifaxBeacon"/>
  84. <CREDIT_SCORE_MODEL_NAME _Type="TransUnionEmpirica"/>
  85. </CREDIT_REQUEST_DATA>
  86. <LOAN_APPLICATION>
  87. <BORROWER BorrowerID="BOR01" _FirstName="$fname" _LastName="$lname" _PrintPositionType="Borrower" _SSN="$ssn">
  88. <_RESIDENCE _StreetAddress="$street" _City="$city" _State="$state" _PostalCode="$zipcode"/>
  89. </BORROWER>
  90. </LOAN_APPLICATION>
  91. </CREDIT_REQUEST>
  92. </REQUEST_DATA>
  93. </REQUEST>
  94. </REQUEST_GROUP>
  95. XML;
  96.  
  97.  
  98.  
  99. $curl = curl_init();
  100.  
  101. curl_setopt_array($curl, array[
  102. CURLOPT_URL => "url/url/url",
  103. CURLOPT_RETURNTRANSFER => 1,
  104. CURLOPT_ENCODING => "",
  105. CURLOPT_MAXREDIRS => 10,
  106. CURLOPT_TIMEOUT => 30000,
  107. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  108. CURLOPT_CUSTOMREQUEST => "POST",
  109. CURLOPT_POSTFIELDS => $output,
  110. CURLOPT_HTTPHEADER => [
  111. "Content-Type: text/xml",
  112. "Content-Length: " . strlen($output),
  113. ],
  114. ]);
  115.  
  116. $response = curl_exec($curl);
  117. $err = curl_error($curl);
  118.  
  119. curl_close($curl);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement