My PHP code starts like this,
<?php                                    

    // Standard Receipt Data
        $amount          = null2unknown($_GET["vpc_Amount"]);
        $vpc_message     = null2unknown($_GET["vpc_Message"]);
        $cardType        = null2unknown($_GET["vpc_Card"]);                        
        $receiptNo       = null2unknown($_GET["vpc_ReceiptNo"]);                                                
        $merchTxnRef     = null2unknown($_GET["vpc_MerchTxnRef"]);
        $transactionNo   = null2unknown($_GET["vpc_TransactionNo"]);                        
        $txnResponseCode = null2unknown($_GET["vpc_TxnResponseCode"]);
        $authorizeID     = null2unknown($_GET["vpc_AuthorizeId"]);


I checked the previous pages for these GET variables ie., vpc_Amount etc., but I could not trace it. I am new to PHP and HTML.
Can somebody help me this by clarifying. Actually this is enclosed in a PHP page called payment_gateway.php. The user when he
gives his email-id,credit-card number etc., this process is involved.

Please help me out.

i think null2unknown is a fucntion that you use on your page. Should be a javascript function.

Hi,

the function null2unknown() is not a PHP function, it's a user defined function so there must be a file, included by payment_gateway.php or by a main file, which defines the above function.

The GET variables, instead are usually set by form fields:

<form method="get">
    <input type="text" name="vpc_Amount">
    ...
</form>

or simply by links:

http://site.tld/payment_gateway.php?vpc_Amount=123&...

But these could be defined also by a redirect: a script that receives the form, renames the variables and then sends everything to the payment_gateway.php script:

header("Location: /payment_gateway.php?vpc_Amount=$amount&amp;...");

Which can be internal or received by another website. A lot depends on how this code is defined. If you provide more information, maybe we can help better. For example, are you using a PHP framework? Is this gateway defined for a specific credit card operator? To be more specific: is this code sending the information to a specific link? If you decide to share the full code, then remember to remove api keys, passwords and other sensitive data.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.