$_REQUEST can not get query parameter

602 Views Asked by At

Payment is successful but it is still displaying error, the Transaction with this ID is not found. I'm performing the transaction form https://pay.digiwallet.nl/test-transaction This is the PHP code

    <?php
    //IDEAL CHECK
    if(isset($_REQUEST['trxid'])) {     // this is not getting the value form my payement system.

    $trx = $_REQUEST['trxid']; 

    $bbdata = array(
        'rtlo' => '144891',
        'once' => 1,
        'trxid' => $trx,
        'once' => 1
    );

    // send a request to example.com (referer = jonasjohn.de)
    $iresult = PostRequest(
        "http://www.xyz/ideal/check",
        "http://www.xyz//",
        $bbdata
    );

I just want TRXID done. Which is not accessed successfully from another page of payment pay.digiwallet.nl payment system.

Animation of problem

1

There are 1 best solutions below

2
unclexo On

You should not trust $_REQUEST to get variables as described in the doc

The variables in $_REQUEST are provided to the script via the GET, POST, and COOKIE input mechanisms and therefore could be modified by the remote user and cannot be trusted. The presence and order of variables listed in this array is defined according to the PHP variables_order configuration directive.

Otherwise, I would suggest you check out variable orders set in the php.ini file.

I would recommend to get a variable from the url using $_GET['trxid'].