I'm using WooCommerce and the following plugin: https://codecanyon.net/item/woocommerce-point-of-sale-pos/7869665
The following code should print a URL on the payment field which should open an app on the computer. All of this is working fine, but the URL needs to contain the total order price (in cents, so multiplied by 100) and I can't manage to get this done. I already wrote the following code and the only thing I'm missing is $order_price_cents.
public function payment_fields()
{
$smartpinurl = "smartpin://payment?price=" . $order_price_cents . "&vat=zero&reference=Bestelling%20bij%DE-IT%20";
echo '<a class="x-btn x-btn-rounded x-btn-regular" href="' . $smartpinurl . '" target="_blank">Activeer Smartpin App</a>';
}
Orders aren't placed yet when this button is clicked, so I can't use the default way to get the price.
E.g: I select a product worth €10.00 in the POS system. So $order_price_cents needs to be 1000.