How to use Custom Events in Adv Wizard Option

codeslayer 27 Oct, 2011
Hi,

I would like to know how to save data sends back to my form by SCI (Shopping Cart Interface - Liberty Reserves). So far I am able to display the results on the form. But how to save them into databse.

Here is the code that you catch the fields sent by SCI
<h1>Payment Failed</h1>

<p>
  You have canceled the following purchase:
</p>
  
<table>
  <tr>
    <td>
      Order ID:
    </td>
    <td>
      <?=$_REQUEST["order_id"]?>
    </td>
  </tr>  
  <tr>
    <td>
      Name:
    </td>
    <td>
      <?=$_REQUEST["item_name"]?>
    </td>
  </tr>  
  <tr>
    <td>
      Price:
    </td>
    <td>
      <?=$_REQUEST["lr_amnt"]?>
    </td>
  </tr>  
</table>
  
<p>
  <a href="index.php">Return to the main page</a>
</p>  
  
<h2>Liberty Reserve fields sent here</h2>

<table>
  <thead>
    <tr>
      <th style="text-align: left">
        Name
      </th>
      <th style="text-align: left">
        Value
      </th>
      <th> 
        
      </th>
    </tr>
  </thead>
  <tbody>
    
<?
$reqKeys = array_keys ($_REQUEST);
foreach($reqKeys as &$key) {
?>
    <tr>
      <td><?=$key?></td>
      <td><?=$_REQUEST[$key]?></td>
      <td><?=ereg("^lr_[a-z_]*$", $key) ? "<div style=\"background: #cc0000; color: #ffffff; padding: 5px; marging: 2px; text-align: center;\">LR</div>" : " "?></td>
    </tr>
<?
}


My guess is, that I may need to add a new event. But how to make it save the data into the database.

Best regards
Hassan
GreyHead 29 Oct, 2011
Hi Hassan,

Yes, you'll need a new Event. Take a look at the PayPal Listener action of Max's I think that does more or less the same thing.

Bob
This topic is locked and no more replies can be posted.