Please check this link. Google already provides a PHP API for eCommerce tracking.
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2 years ago
Get the weekly newsletter! In it, you'll get:
see an example newsletter