V4.1.x Liberty Reserve Payment Gateway

Discussion in 'Modules / Plugins / Modifications' started by Hey Me, Jul 22, 2009.

  1. Hey Me Customer

    Hello,

    So I'm trying to add a payment gateway for Liberty Reserve to my 4.1.4 developer. I'm listing below all what I did so far & information I gathered (please ask if you want more details), any help or clues appreciated especially that my knowledge in PHP is very limited

    Editing config.php was rather simple:
    PHP:
    <?php 
    $data
    ['gateway']['name'] = "libertyreserve";
    $data['gateway']['displayname'] = "Liberty Reserve";
    $data['gateway']['showas'] = "Liberty Reserve USD";
    $data['gateway']['version'] = "v1";
    $data['gateway']['extraTxt'] = "Account Number";
    $data['gateway']['extra2Txt'] = "Leave Blank";
    $data['gateway']['cconsite'] = 'N';
    ?>
    The N in the end is fine I guess, or better put Y ?

    Now to the sr.php file, following instructions for SCI on LR website, I edited the forms this way:
    PHP:
    function libertyreserve_createForm($params)
    {
        
    $libertyreserveurl="https://sci.libertyreserve.com";
        
    $output '<form name="final" action="'.$libertyreserveurl.'" method="GET">';
        
    $output.= '<input type="hidden" name="lr_acc" value="'.$params['extra'].'">';
        
    $output.= '<input type="hidden" name="lr_store" value="My Store">';
        
    $output.= '<input type="hidden" name="lr_amnt" value="'.$params['oTotal'].'">';
        
    $output.= '<input type="hidden" name="lr_currency" value="LRUSD">';
        
        return 
    $output;
    }
    I tested the form & it works fine but I'm not sure if 68classifieds needs to send more data? Also the bigger headache is getting data back after payment is made.

    I can add store data in my LR account (whose ID is in the extra field), the interface looks like this:



    I think my Success URL should be http://domain.com/thanks.php?gateway=libertyreserve is it the same as the Fail URL ?

    Status URL is the page (or email) that will receive data from LR to allow merchant verify SCI server's data, data contains among other fields, 2 HASH SHA256 strings in fields called lr_encrypted & lr_encrypted2 , for example you can read this about verification via lr_encrypted:
    OK, I don't have a clue how to implement this in 68, LR offer a sample SCI script you can download from here. I'm attaching to this post the status page I found in that sample.

    Thanks for your attention!

    Attached Files:

  2. Hey Me Customer

    Nice quote But I still need some help

Share This Page