Return values and egopay issues

The issue is with the return values and store them with website database.

Also not sure how to get the he transaction_id
This code i am using the site.

<?php
    require('/path/to/EgoPay/sci/EgoPaySci.php');
    try {
        $oEgopay = new EgoPaySci(array(
            'store_id'          => 'STORE ID',
            'store_password'    => 'STORE PASSWORD'
        ));
        $sPaymentHash = $oEgopay->createHash(array(
            'amount'    => '3.00',
            'currency'  => 'USD',
            'description' => 'My payment',
            'cf_1' => 'My custom data'
        ));
    } catch (EgoPayException $e) {
        die($e->getMessage());
    }
?>
<form action="<?php echo EgoPaySci::EGOPAY_PAYMENT_URL; ?>" method="post">
    <input type="hidden" name="hash" value="<?php echo $sPaymentHash ?>" />
    <input type="submit" value="Confirm Payment" />
</form>

the callback part.. <?php
require('sci/EgoPaySci.php');
try
{
    $oEgopay = new EgoPaySciCallback(array(
        'store_id'          => 'STORE ID',
        'store_password'    => 'STORE PASSWORD'
    ));
    $aResponse = $oEgopay->getResponse($_POST);    
    //@todo: check if order amount and currency is valid
    //@todo: check your order status
    //@todo: update your database
}
catch(EgoPayException $e)
{
    die($e->getMessage()); 
}

From the looks of their website, you should be using a Callback to get the result, no?

Yes that is correct a callback is being used to get the results, yet the transcation-id is not displaying :\,

I’d missed your callback code because it’s in the same block as your form. (which obviously it’s not. It’s in a seperate PHP page.)

var_dump($aResponse);

see what that contains, because their website isnt entirely clear on what this variable contains.

Yes the code is done seperately the form and callback in different pages but but the callback returns params required “Product_id”

https://www.egopay.com/developers/sci/callbacks

What does the error "This param is required - ‘product_id’ " mean?

If you see this message it means you are trying to access the callback script directly (in a browser). The callback script should only be accessed by EgoPay request, as it provides the ‘product_id’ as a POST parameter. The SCI library uses this parameter to receive all information about the payment.

ok will even I dont access it in the url… it has the same error. So I assume it still the same??