Download the PHP package amattu2/carfax-wrapper without Composer

On this page you can find all versions of the php package amattu2/carfax-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package carfax-wrapper

Introduction

This is a CARFAX Vehicle History Reporting, QuickVIN, and Service History Check integration toolkit. It provides the interface to achieve the following results:

As achieved through proprietary APIs and integration procedures. Using this PHP based toolkit is not possible without an existing CARFAX Service Data Transfer Facilitation Agreement, and it relies on API keys that are not publicly subscribable.

Usage

Install & Setup

Note: For the examples in config.ini.example must be renamed to config.ini and updated with your CARFAX credentials.


FTP

This is a helper class for reporting repair data to the CARFAX VHR system. It substantially eases the load required of a developer to implement CARFAX vehicle history reporting from a proprietary DMS/SMS system.

constructor

Initialize the class component using the constructor


write(array $data, $handle = null) : bool

Write a single record to the export file. Please Note: This function DOES NOT validate field values. It only writes what was provided. Your implementation of the class will need to validate Repair Order field values. This ONLY ensures that the field is present in the array.

writeAll(array $data) : int

Write an array of repair orders to the report file. This is an efficient wrapper to the write() method, and maintains a file handle at all times. If you are able to write a multitude of Repair Orders at a single time, use this. Please Note: This function DOES NOT validate field values. It only writes what was provided. Your implementation of the class will need to validate Repair Order field values. This ONLY ensures that the field is present in the array.

upload() : bool

Submit the generated record to the CARFAX FTP endpoint.

cleanUp() : bool

This is an entirely optional function that will delete the Repair Order file from the local server. It should be called after uploading it to the FTP server.

getTotalRecords() : int

This returns the total number of repair orders written to the report file. Does not include the header line.

getFilePath() : ?string

This returns the fully-qualified path to the report file if the file exists.

getFileName() : ?string

This returns the filename of the report file if it exists.


ServiceHistory

This is a entirely static class used to fetch repair history data from CARFAX by a vehicle VIN.

setLocationId(string $locationId) : void

Update the Location ID for the current instance of the class. This is provided by CARFAX at the time of account setup.

setProductDataId(string $productDataId) : void

Update the Product Data ID for the current instance of the class. It is the equivelent of a API key, and is CARFAX defined at the time of account setup.

get(string $VIN) : array

This is the actual function exposed for fetching the vehicle history by VIN number. If you do not have the locationId or productDataId set, errors will be thrown. Everything else is error safe, including CARFAX API failures. The function will always return an array or throw an error.

If a record (Overview or History) does NOT have a valid:

Abbreviated example response

Note: See the examples in servicehistory-get.php


QuickVIN

The QuickVIN Plus class is a wrapper for the CARFAX QuickVIN Plus decoder API. It turns a license plate + state into a VIN number with a VIN decode. It is a static class, and does not require instantiation.

setLocationId(string $locationId): void

Update the Location ID for the current instance of the class. This is provided by CARFAX at the time of account setup.

setProductDataId(string $productDataId): void

Update the Product Data ID for the current instance of the class. It is the equivelent of a API key, and is CARFAX defined at the time of account setup.

decode(string $plate, string $state, ?string $VIN = null): ?SimpleXMLElement

Perform a plate+state to VIN decode. If the decode is successful, a SimpleXMLElement object will be returned. If the decode is unsuccessful, NULL will be returned.

Note: See the examples in quickvin-decode.php

Requirements & Dependencies


All versions of carfax-wrapper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
ext-curl Version *
ext-simplexml Version *
ext-xml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package amattu2/carfax-wrapper contains the following files

Loading the files please wait ....