Download & load the PHP class

1) Include the AfterPay PHP Library by using Composer. If you are not familiar with using Composer, read this article with the basics about PHP Composer: http://culttt.com/2013/01/07/what-is-php-composer/. The AfterPay PHP Library can be found on packagist.org as “Payintegrator/Afterpay” (Details and releasenotes: link). The library can be included by the following command:

composer require payintegrator/afterpay

2) Next make sure you are using the Autoloader:

require 'vendor/autoload.php';

3) Create an empty object, for example using:

$Afterpay = new AfterpayAfterpay();

This object wil be used to store the information of your order and to send an order through SOAP to our webservices.