i have been attempting to make a payment gateway for my website, and since the cost of products is always different from customer to customer using hard codded amounts doesn’t work however i am unable to use a variable for it for some reason, this may just be me missing something but i figure i would ask.
$payments_api = $square_client->getPaymentsApi();
$money = new Money();
$money->setAmount($paymentAmount);
$money->setCurrency($location_info->getCurrency());
the $paymentAmount variable is already defined however when i go to test the payment with sandbox credentials nothing happens i do get a success message or an error message
Our example does have the amount hard coded but you can definitely pass in the amount you need to charge the customer to replace the hard coded amount. 