PHP code example of primitivesocial / shift4wrapper

1. Go to this page and download the library: Download primitivesocial/shift4wrapper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

primitivesocial / shift4wrapper example snippets


$transaction = new Transaction($accessToken);

$transaction->tax(11.14)
		->total(111.45)
		->clerk('1')
		->invoiceNumber('12345')
		->tokenValue($token)
		->purchaseCard(array(
			'customerReference' => 412348,
			'destinationPostalCode' => 19134,
			'productDescriptors' => array('rent')
		))
		->sale();

$transaction = new Transaction($accessToken);

$transaction->total(200.00)
		->tokenValue($token)
		->invoiceNumber('12345')
		->clerk('5188')
		->refund();