• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

Converting code from PHP to ColdFusion 9


Converting code from PHP to ColdFusion 9

<?php

//check the IP address and the presence of POST variables

if($_SERVER['REMOTE_ADDR']=='195.149.229.109' && !empty($_POST)){

$id_sprzedawcy = $_POST['id'];
$status_transakcji = $_POST['tr_status'];
$id_transakcji = $_POST['tr_id'];
$kwota_transakcji = $_POST['tr_amount'];
$kwota_zaplacona = $_POST['tr_paid'];
$blad = $_POST['tr_error'];
$data_transakcji = $_POST['tr_date'];
$opis_transackji = $_POST['tr_desc'];
$ciag_pomocniczy = $_POST['tr_crc'];
$email_klienta = $_POST['tr_email'];
$suma_kontrolna = $_POST['md5sum'];

/ / check the status of the transaction

if($status_transakcji=='TRUE' && $blad=='none'){

/*
Further processing, such as:
-identification of the transaction on the basis of the supporting string
-verification of the transaction (checking the correctness of the amounts, etc.)
-Checkout
*/

}

else

{

//transaction performed incorrectly

}

}

echo 'TRUE'; //response for the server to receive data

?>

Open in new window

documentation-10-en.pdf
0
bandziohr
Asked:
bandziohr
1 Solution
 
gdemariaCommented:

<cfif cgi.remove_addr is "195.149.229.109" and isDefined("form.submit")>

   <cfset id_sprzedawcy = FORM.ID>
   <cfset status_transakcji = FORM.tr_status>
    ... etc...

   / / check the status of the transaction

   <cfif status_transakcji is true and blad is 'none'>

 <!-----
Further processing, such as:
-identification of the transaction on the basis of the supporting string
-verification of the transaction (checking the correctness of the amounts, etc.)
-Checkout
 ----->

<cfelse>

    transaction performed incorrectly

</cfif>

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now