Authorize and send the order

After the order object is completed, the order can be sent to AfterPay. You need the AfterPay credentials (merchantid, portfolioid and password). You also need to determine, whether the order needs to be sent to the AfterPay test, or to the production environment.

$authorisation['merchantid'] = 'MERCHANTID';
$authorisation['portfolioid'] = 'PORTFOLIOID';
$authorisation['password'] = 'PASSWORD';
$modus = 'test'; // or 'live' for production
$Afterpay->do_request( $authorisation, $modus );