Paypal付款代码

What's the new code in getting the amount, currency and transaction id for paypal in php? I have this code. It's from the tutorial that I've been watching all throughout the making of my ecommerce website.

//payment details from paypal

        $amount = $_GET['amt'];

        $currency = $_GET['cc'];

        $trx_id = $_GET['tx']; //transaction

And here, I'm going to insert it the data above to these varibles (with query).

//inserting payment to table
                $insert_payment= "insert into payments(amount,customer_id,product_id,trx_id,currency) values ('$amount','$c_id','$pro_id','$trx_id','$currency')";

                $run_payment = mysqli_query($con, $insert_payment);

And the result, product_id has only the data. How can I fix it?

if you have a php variables in mysql query then you must add "." before and after variables in query.

$insert_payment= "INSERT INTO payments (amount,customer_id,product_id,trx_id,currency) 
VALUES ('.$amount.','.$c_id.','.$pro_id.','.$trx_id.','.$currency.')";

Try now..