I have a problem. My store built on WP+WooCommerce and we using square payment gateway. When user bought some our products he is like autorized but after the send a parcel we capture amount from the credit card. But when we see that amount of shipping is different we set another price and the problem is when we capture amount is different, the customer transaction is $300, but we need to charge $310, or transaction is $300, but need to charge $280.
The same issue not only with WordPress, I also used PHP sdk and tried to do it and the same.