I want to insert different payment buttons in my car sharing web app. The button amounts are based on DB data inserted by sellers.
Sellers offer service(for $) -> Buyer searches for service -> list of services with related payment buttons are displayed
HOW IT WORKS The seller writes his amount $, the amount goes to DB. Whenever the buyer searches, a list is displayed with different sellers and related payment buttons (with related amounts).
I tried to modify PayPal button string, inserting the price variable, but PayPal does not allow these modifications anymore.
if(mysqli_num_rows($result) != 0) {
while($row = mysqli_fetch_assoc($result)){
$user = $row['user'];
$price= $row['price'];
echo '$user' . $userTrip->getName();
echo 'href="https://www.paypal.com/cgi-bin/[email protected]&cmd=_xclick¤cy_code=EUR&amount=' . $price. '&item_name=Pagamento%20Trip">Pay withPaypal</a>';