in reply to receiving btc payments

# BUYER AMOUNT HE/SHE SUPPOSED TO SEND IN USD $USD = $CGI->param("usd_amount");

Users can alter these values easily. I can't see any obvious checking for double spends/chargebacks.

"I had a plan of using javascript to keep reloading the page. if our Perl scripts print Thank You. We Have Received Your Payment. then javascript can determine and stops reloading page frequently"

Reloading the page is a bad idea, just look at what your code does to understand why. You also don't take into account the processing time for a BTC transaction, this is totally out of your hands.

Replies are listed 'Best First'.
Re^2: receiving btc payments
by bigup401 (Pilgrim) on Dec 07, 2018 at 20:12 UTC

    ya reloading page is bad idea, but i have no way to do it. i have to use it

    uniless there any other way. i can do it

      Ignoring all the other issues, you can't even be following the code you wrote. You don't keep track of who has paid for what unless the transaction has hit the blockchain, each page refresh you throw everything away. This is unworkable as any form of payment system.

        yes i know. refreshing the page will send post request again and generate other receiving address. which i want to avoid thats why am just looking for other way. but other issues are not big issue as this is just a sample script. can be implemented

        my problem is only that. to avoid refreshing the page. i may find myself using ajax with loading gif to determine payment if received. but i didn't want to use ajax