Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $state = $_REQUEST[state];
- $type = $_REQUEST[type];
- $street = $_REQUEST[street];
- $city = $_REQUEST[city];
- $zipcode = $_REQUEST[zipcode];
- $fname = $_REQUEST[fname];
- $lname = $_REQUEST[lname];
- $email = $_REQUEST[email];
- $phone = $_REQUEST[phone];
- $estCreditScore = $_REQUEST[estCreditScore];
- $estLoanAmount = $_REQUEST[estLoanAmount];
- $estDownPayment = $_REQUEST[estDownPayment];
- $monthlyIncome = $_REQUEST[monthlyIncome];
- $ssn = $_REQUEST[ssn];
- $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);
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => "url/url/url",
- CURLOPT_RETURNTRANSFER => 1,
- CURLOPT_ENCODING => "",
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 30000,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => "POST",
- CURLOPT_SSL_VERIFYHOST => false, //for testing on my dev machine only. To be removed before deployment
- CURLOPT_SSL_VERIFYPEER => false, //for testing on my dev machine only. To be removed before deployment
- CURLOPT_POSTFIELDS => $output,
- CURLOPT_HTTPHEADER => array(
- "Accept: */*",
- "Cache-Control: no-cache",
- "Connection: keep-alive",
- "Content-Type: text/xml",
- "Host: url/url",
- "User-Agent: PostmanRuntime/7.13.0",
- "accept-encoding: gzip, deflate",
- "content-length: 1426"
- ),
- ));
- $response = curl_exec($curl);
- $err = curl_error($curl);
- curl_close($curl);
- if ($err) {
- echo "cURL Error #:" . $err;
- } else {
- echo $response;
- }
- $state = htmlspecialchars($_REQUEST[state]);
- $type = htmlspecialchars($_REQUEST[type]);
- $street = htmlspecialchars($_REQUEST[street]);
- $city = htmlspecialchars($_REQUEST[city]);
- $zipcode = htmlspecialchars($_REQUEST[zipcode]);
- $fname = htmlspecialchars($_REQUEST[fname]);
- $lname = htmlspecialchars($_REQUEST[lname]);
- $email = htmlspecialchars($_REQUEST[email]);
- $phone = htmlspecialchars($_REQUEST[phone]);
- $estCreditScore = htmlspecialchars($_REQUEST[estCreditScore]);
- $estLoanAmount = htmlspecialchars($_REQUEST[estLoanAmount]);
- $estDownPayment = htmlspecialchars($_REQUEST[estDownPayment]);
- $monthlyIncome = htmlspecialchars($_REQUEST[monthlyIncome]);
- $ssn = htmlspecialchars($_REQUEST[ssn]);
- $output = <<< XML
- <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="$fname" _LastName="$lname" _PrintPositionType="Borrower" _SSN="$ssn">
- <_RESIDENCE _StreetAddress="$street" _City="$city" _State="$state" _PostalCode="$zipcode"/>
- </BORROWER>
- </LOAN_APPLICATION>
- </CREDIT_REQUEST>
- </REQUEST_DATA>
- </REQUEST>
- </REQUEST_GROUP>
- XML;
- $curl = curl_init();
- curl_setopt_array($curl, array[
- CURLOPT_URL => "url/url/url",
- CURLOPT_RETURNTRANSFER => 1,
- CURLOPT_ENCODING => "",
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 30000,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => "POST",
- CURLOPT_POSTFIELDS => $output,
- CURLOPT_HTTPHEADER => [
- "Content-Type: text/xml",
- "Content-Length: " . strlen($output),
- ],
- ]);
- $response = curl_exec($curl);
- $err = curl_error($curl);
- curl_close($curl);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement